mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
fix for bug [ 1015533 ] Private entries prohibit response
If you are invited to a private event, you get full access to it, as you would if it were not private. Only restriction is: other people you gave access to your private events, still cant read the event, as long as they have no direct private grant from the owner of the event.
This commit is contained in:
parent
e72a231b42
commit
f22dab597d
@ -611,14 +611,22 @@ class bocal
|
||||
if (is_array($event) && $needed == PHPGW_ACL_READ)
|
||||
{
|
||||
// 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 ($this->grants[$uid] & PHPGW_ACL_READ || $uid == $user)
|
||||
if ($uid == $user)
|
||||
{
|
||||
$grants |= PHPGW_ACL_READ;
|
||||
// if we are a participant, we have an implicite READ and PRIVAT grant
|
||||
$grants |= PHPGW_ACL_READ | PHPGW_ACL_PRIVATE;
|
||||
break;
|
||||
}
|
||||
elseif ($this->grants[$uid] & PHPGW_ACL_READ)
|
||||
{
|
||||
// if we have a READ grant from a participant, we dont give an implicit privat grant too
|
||||
$grants |= PHPGW_ACL_READ;
|
||||
// we cant break here, as we might be a participant too, and would miss the privat grant
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user