Calendar: Fix group invitations were left out of "not rejected" filter

This commit is contained in:
nathan 2023-03-24 09:16:06 -06:00
parent d567897e9d
commit 0b5daa0fb6

View File

@ -507,16 +507,22 @@ class calendar_bo
// for groups we have to include the members
if ($GLOBALS['egw']->accounts->get_type($user) == 'g')
{
if ($no_enum_groups) continue;
// Include the group itself to catch group invitations
$users[] = $user;
if($no_enum_groups)
{
continue;
}
$members = $GLOBALS['egw']->accounts->members($user, true);
if (is_array($members))
if(is_array($members))
{
foreach($members as $member)
{
// use only members which gave the user a read-grant
if (!in_array($member, $users) &&
($ignore_acl || $this->check_perms(Acl::READ|($use_freebusy?self::ACL_FREEBUSY:0),0,$member)))
if(!in_array($member, $users) &&
($ignore_acl || $this->check_perms(Acl::READ | ($use_freebusy ? self::ACL_FREEBUSY : 0), 0, $member)))
{
$users[] = $member;
}