fixed groupmembers cant accept/reject group-invitations (error: failed because of insufficient rights!)

This commit is contained in:
Ralf Becker 2011-11-21 14:27:35 +00:00
parent f3b4f7e2f9
commit 2d41bcf631

View File

@ -1034,8 +1034,13 @@ class calendar_boupdate extends calendar_bo
}
if (!is_array($event) && !($event = $this->read($event))) return false;
// regular user and groups
return isset($event['participants'][$uid]) && $this->check_perms(EGW_ACL_EDIT,0,$uid);
// regular user and groups (need to check memberships too)
if (!isset($event['participants'][$uid]))
{
$memberships = $GLOBALS['egw']->accounts->memberships($uid,true);
}
$memberships[] = $uid;
return array_intersect($memberships, array_keys($event['participants'])) && $this->check_perms(EGW_ACL_EDIT,0,$uid);
}
/**