check user permissions in calendar's changepermission.php

remotes/origin/stable4
Georg Ehrke 14 years ago
parent 55eb318265
commit 9c8eb104b6
  1. 8
      apps/calendar/ajax/share/changepermission.php

@ -17,6 +17,14 @@ switch($idtype){
OCP\JSON::error(array('message'=>'unexspected parameter'));
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'];
$sharetype = strip_tags($_GET['sharetype']);
switch($sharetype){

Loading…
Cancel
Save