Fix CalDAV PUT failure

This commit is contained in:
Jörg Lehrke 2010-05-18 10:03:21 +00:00
parent eddf0f4038
commit d2c03cd287
2 changed files with 6 additions and 4 deletions

View File

@ -846,6 +846,8 @@ class calendar_bo
{ {
if ($date) $date = $this->date2ts($date); if ($date) $date = $this->date2ts($date);
$return = null;
if ($ignore_acl || is_array($ids) || ($return = $this->check_perms(EGW_ACL_READ,$ids,0,$date_format,$date))) if ($ignore_acl || is_array($ids) || ($return = $this->check_perms(EGW_ACL_READ,$ids,0,$date_format,$date)))
{ {
if (is_array($ids) || !isset(self::$cached_event['id']) || self::$cached_event['id'] != $ids || if (is_array($ids) || !isset(self::$cached_event['id']) || self::$cached_event['id'] != $ids ||
@ -1064,7 +1066,7 @@ class calendar_bo
{ {
if (!is_array($event)) if (!is_array($event))
{ {
$event = $this->read($event,$date_to_read,True,$date_format); // = no ACL check !!! $event = $this->read($event,$date_to_read,true,$date_format); // = no ACL check !!!
} }
if (!is_array($event)) if (!is_array($event))
{ {

View File

@ -477,7 +477,7 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
{ {
if ($this->debug) error_log(__METHOD__."($id, $user)".print_r($options,true)); if ($this->debug) error_log(__METHOD__."($id, $user)".print_r($options,true));
$return_no_access=true; // as handled by importVCal anyway and allows it to set the status for participants $return_no_access = true; // as handled by importVCal anyway and allows it to set the status for participants
$oldEvent = $this->_common_get_put_delete('PUT',$options,$id,$return_no_access); $oldEvent = $this->_common_get_put_delete('PUT',$options,$id,$return_no_access);
if (!is_null($oldEvent) && !is_array($oldEvent)) if (!is_null($oldEvent) && !is_array($oldEvent))
{ {
@ -674,8 +674,8 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
function read($id) function read($id)
{ {
if ($this->debug > 1) error_log("bo-ical read :$id:"); if ($this->debug > 1) error_log("bo-ical read :$id:");
if (!$this->bo->check_perms(EGW_ACL_FREEBUSY, $id, 0, 'server')) return false; if (!($retval = $this->bo->check_perms(EGW_ACL_FREEBUSY, $id, 0, 'server'))) return $retval;
$event = $this->bo->read($id,null,true,'server'); $event = $this->bo->read($id, null, true, 'server');
if (!$this->bo->check_perms(EGW_ACL_READ, $id, 0, 'server')) if (!$this->bo->check_perms(EGW_ACL_READ, $id, 0, 'server'))
{ {
$this->bo->clear_private_infos($event, array($this->bo->user, $event['owner'])); $this->bo->clear_private_infos($event, array($this->bo->user, $event['owner']));