forked from extern/egroupware
buffer and provide debug on missing participants to an event
This commit is contained in:
parent
aae4b8ac8d
commit
514caa5d0e
@ -1002,27 +1002,34 @@ class calendar_bo
|
|||||||
// Check if the $user is one of the participants or has a read-grant from one of them
|
// Check if the $user is one of the participants or has a read-grant from one of them
|
||||||
// in that case he has an implicite READ grant for that event
|
// in that case he has an implicite READ grant for that event
|
||||||
//
|
//
|
||||||
foreach($event['participants'] as $uid => $accept)
|
if ($event['participants'] && is_array($event['participants']))
|
||||||
{
|
{
|
||||||
if ($uid == $user || $uid < 0 && in_array($user,$GLOBALS['egw']->accounts->members($uid,true)))
|
foreach($event['participants'] as $uid => $accept)
|
||||||
{
|
{
|
||||||
// if we are a participant, we have an implicite READ and PRIVAT grant
|
if ($uid == $user || $uid < 0 && in_array($user,$GLOBALS['egw']->accounts->members($uid,true)))
|
||||||
$grants |= EGW_ACL_READ | EGW_ACL_PRIVATE;
|
{
|
||||||
break;
|
// if we are a participant, we have an implicite READ and PRIVAT grant
|
||||||
}
|
$grants |= EGW_ACL_READ | EGW_ACL_PRIVATE;
|
||||||
elseif ($this->grants[$uid] & EGW_ACL_READ)
|
break;
|
||||||
{
|
}
|
||||||
// if we have a READ grant from a participant, we dont give an implicit privat grant too
|
elseif ($this->grants[$uid] & EGW_ACL_READ)
|
||||||
$grants |= EGW_ACL_READ;
|
{
|
||||||
// we cant break here, as we might be a participant too, and would miss the privat grant
|
// if we have a READ grant from a participant, we dont give an implicit privat grant too
|
||||||
}
|
$grants |= EGW_ACL_READ;
|
||||||
elseif (!is_numeric($uid))
|
// we cant break here, as we might be a participant too, and would miss the privat grant
|
||||||
{
|
}
|
||||||
// if we have a resource as participant
|
elseif (!is_numeric($uid))
|
||||||
$resource = $this->resource_info($uid);
|
{
|
||||||
$grants |= $resource['rights'];
|
// if we have a resource as participant
|
||||||
|
$resource = $this->resource_info($uid);
|
||||||
|
$grants |= $resource['rights'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error_log(__METHOD__." no participants for event:".print_r($event,true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['egw']->accounts->get_type($owner) == 'g' && $needed == EGW_ACL_ADD)
|
if ($GLOBALS['egw']->accounts->get_type($owner) == 'g' && $needed == EGW_ACL_ADD)
|
||||||
|
Loading…
Reference in New Issue
Block a user