Free/Busy handling for groups and recources; Groups: if a group allows only free/busy to its users, then participation does not mean a lot. Resources: if grant is free/busy only explicit recources rights are not to be regarded

This commit is contained in:
Klaus Leithoff 2010-02-10 12:29:30 +00:00
parent 8c99f00c6b
commit c619191a2e

View File

@ -929,6 +929,9 @@ class calendar_bo
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
// exept the group gives its members only EGW_ACL_FREEBUSY and the participant is not the current user
if ($this->grants[$uid] == EGW_ACL_FREEBUSY && $uid != $user) continue;
$grants |= EGW_ACL_READ | EGW_ACL_PRIVATE;
break;
}
@ -940,6 +943,8 @@ class calendar_bo
}
elseif (!is_numeric($uid))
{
// if the owner only grants EGW_ACL_BUSY we are not interested in the recources explicit rights
if ($grants == EGW_ACL_FREEBUSY) break;
// if we have a resource as participant
$resource = $this->resource_info($uid);
$grants |= $resource['rights'];