Ensure the existence of expected default permission keys in ACL::getFullSelectorHTML

- Addresses https://sozialwolke.net/display/703b8751-145d-e11f-a923-98e999239905
This commit is contained in:
Hypolite Petovan 2019-11-29 11:39:49 -05:00
parent 25194b58b8
commit 0ff4381305

View file

@ -333,6 +333,13 @@ class ACL extends BaseObject
// Defaults user permissions
if (empty($default_permissions)) {
$default_permissions = self::getDefaultUserPermissions($user);
} else {
$default_permissions = [
'allow_cid' => $default_permissions['allow_cid'] ?? [],
'allow_gid' => $default_permissions['allow_gid'] ?? [],
'deny_cid' => $default_permissions['deny_cid'] ?? [],
'deny_gid' => $default_permissions['deny_gid'] ?? [],
];
}
if (count($default_permissions['allow_cid'])