mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
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
|
||||
// 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
|
||||
$grants |= EGW_ACL_READ | EGW_ACL_PRIVATE;
|
||||
break;
|
||||
}
|
||||
elseif ($this->grants[$uid] & EGW_ACL_READ)
|
||||
{
|
||||
// if we have a READ grant from a participant, we dont give an implicit privat grant too
|
||||
$grants |= EGW_ACL_READ;
|
||||
// we cant break here, as we might be a participant too, and would miss the privat grant
|
||||
}
|
||||
elseif (!is_numeric($uid))
|
||||
{
|
||||
// if we have a resource as participant
|
||||
$resource = $this->resource_info($uid);
|
||||
$grants |= $resource['rights'];
|
||||
if ($uid == $user || $uid < 0 && in_array($user,$GLOBALS['egw']->accounts->members($uid,true)))
|
||||
{
|
||||
// if we are a participant, we have an implicite READ and PRIVAT grant
|
||||
$grants |= EGW_ACL_READ | EGW_ACL_PRIVATE;
|
||||
break;
|
||||
}
|
||||
elseif ($this->grants[$uid] & EGW_ACL_READ)
|
||||
{
|
||||
// if we have a READ grant from a participant, we dont give an implicit privat grant too
|
||||
$grants |= EGW_ACL_READ;
|
||||
// we cant break here, as we might be a participant too, and would miss the privat grant
|
||||
}
|
||||
elseif (!is_numeric($uid))
|
||||
{
|
||||
// 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)
|
||||
|
Loading…
Reference in New Issue
Block a user