diff --git a/lib/calendar.php b/lib/calendar.php index 2cf815489..8583ac7a4 100644 --- a/lib/calendar.php +++ b/lib/calendar.php @@ -182,9 +182,7 @@ public static function addCalendarFromDAVData($principaluri,$uri,$name,$componen public static function editCalendar($id,$name=null,$components=null,$timezone=null,$order=null,$color=null) { // Need these ones for checking uri $calendar = self::find($id); - if ($calendar['userid'] != OCP\User::getUser() && !OC_Group::inGroup(OCP\User::getUser(), 'admin')) { - $sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $id); - if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_UPDATE)) { + if ($calendar['userid'] != OCP\User::getUser()) {{ throw new Exception( OC_Calendar_App::$l10n->t( 'You do not have the permissions to update this calendar.'