check userrights in events.php

This commit is contained in:
Georg Ehrke 2012-02-12 10:40:57 +01:00
parent 1bd3b65069
commit 73038156cc
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ if($_GET['calendar_id'] == 'shared'){
$events = array_merge($events, $calendarevents);
}
}else{
$calendar = OC_Calendar_Calendar::find($_GET['calendar_id']);
if($calendar['userid'] != OC_User::getUser()){
OC_JSON::error();
exit;
}
$events = OC_Calendar_Object::allInPeriod($_GET['calendar_id'], $start, $end);
}
$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());