mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
Fix public addressbook categories with were not visible with grant on personal addressbook
This commit is contained in:
parent
04bedf30be
commit
be3e5fbe8d
@ -573,12 +573,13 @@ class Categories
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for ACL granted access, the self::GLOBAL_ACCOUNT user must not get access by ACL to keep old behaviour
|
// Check for ACL granted access, the self::GLOBAL_ACCOUNT user must not get access by ACL to keep old behaviour
|
||||||
$acl_grant = $this->account_id != self::GLOBAL_ACCOUNT && ($category['appname'] ?? null) == $this->app_name && $this->app_name != 'addressbook';
|
$acl_grant = $this->account_id != self::GLOBAL_ACCOUNT && ($category['appname'] ?? null) == $this->app_name;
|
||||||
$owner_grant = false;
|
$owner_grant = false;
|
||||||
foreach(!empty($category['owner']) ? explode(',',$category['owner']) : [] as $owner)
|
foreach(!empty($category['owner']) ? explode(',',$category['owner']) : [] as $owner)
|
||||||
{
|
{
|
||||||
$owner_grant = $owner_grant || (is_array($this->grants) && !empty($this->grants[$owner]) && ($this->grants[$owner] & $needed) &&
|
$owner_grant = $owner_grant || (is_array($this->grants) && !empty($this->grants[$owner]) && ($this->grants[$owner] & $needed) &&
|
||||||
($category['appname'] !== 'addressbook' && $category['access'] === 'public' || ($this->grants[$owner] & Acl::PRIVAT)));
|
(($category['appname'] !== 'addressbook' && $category['access'] === 'public' || ($this->grants[$owner] & Acl::PRIVAT)) ||
|
||||||
|
($category['appname'] == 'addressbook' && $category['access'] === 'public' && ($this->grants[$owner] & $needed))));
|
||||||
}
|
}
|
||||||
return $acl_grant && $owner_grant;
|
return $acl_grant && $owner_grant;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user