]> source.dussan.org Git - nextcloud-server.git/commitdiff
check user permissions in calendar's changepermission.php
authorGeorg Ehrke <dev@georgswebsite.de>
Mon, 14 May 2012 13:38:50 +0000 (15:38 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Mon, 14 May 2012 13:42:16 +0000 (15:42 +0200)
apps/calendar/ajax/share/changepermission.php

index e4a4f186ab06548457eecb15467e7fd6802b1959..2737420c94ede4c2717f8008cd163c040d401242 100755 (executable)
@@ -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){