Skip to content
Snippets Groups Projects
Commit 9c8eb104 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

check user permissions in calendar's changepermission.php

parent 55eb3182
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,14 @@ switch($idtype){ ...@@ -17,6 +17,14 @@ switch($idtype){
OCP\JSON::error(array('message'=>'unexspected parameter')); OCP\JSON::error(array('message'=>'unexspected parameter'));
exit; exit;
} }
if($idtype == 'calendar' && !OC_Calendar_App::getCalendar($id)){
OCP\JSON::error(array('message'=>'permission denied'));
exit;
}
if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
OCP\JSON::error(array('message'=>'permission denied'));
exit;
}
$sharewith = $_GET['sharewith']; $sharewith = $_GET['sharewith'];
$sharetype = strip_tags($_GET['sharetype']); $sharetype = strip_tags($_GET['sharetype']);
switch($sharetype){ switch($sharetype){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment