From ca4f237dc49901f18678395aab3caa1e2689363c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 21 Oct 2010 15:30:20 +0000 Subject: [PATCH] fixed http status "400 Something went wrong" on PUT request in CalDAV, if user has no explicit FREEBUSY rights for calendar of modified event --- calendar/inc/class.calendar_bo.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 5f4e3c7580..e30291cd18 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -1083,6 +1083,10 @@ class calendar_bo $private = !$event['public']; } $grants = $this->grants[$owner]; + + // now any ACL rights implicate FREEBUSY rights (at least READ has to include FREEBUSY) + if ($grants) $grants |= EGW_ACL_FREEBUSY; + if (is_array($event) && ($needed == EGW_ACL_READ || $needed == EGW_ACL_FREEBUSY)) { // Check if the $user is one of the participants or has a read-grant from one of them @@ -1132,6 +1136,7 @@ class calendar_bo { $this->debug_message('bocal::check_perms(%1,%2,%3)=%4',True,ACL_TYPE_IDENTIFER.$needed,$event,$other,$access); } + //error_log(__METHOD__."($needed,".array2string($event).",$other) returning ".array2string($access)); return $access; }