Merge pull request #4674 from annando/acl-fix
Fix the ACL problem issue 4616
This commit is contained in:
commit
641bd5eaa6
21 changed files with 2625 additions and 2614 deletions
|
@ -221,6 +221,11 @@ class ACL extends BaseObject
|
|||
return $o;
|
||||
}
|
||||
|
||||
private static function fixACL(&$item)
|
||||
{
|
||||
$item = intval(str_replace(['<', '>'], ['', ''], $item));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default permission of the provided user array
|
||||
*
|
||||
|
@ -242,6 +247,12 @@ class ACL extends BaseObject
|
|||
preg_match_all($acl_regex, defaults($user, 'deny_gid', ''), $matches);
|
||||
$deny_gid = $matches[1];
|
||||
|
||||
// Reformats the ACL data so that it is accepted by the JS frontend
|
||||
array_walk($allow_cid, 'self::fixACL');
|
||||
array_walk($allow_gid, 'self::fixACL');
|
||||
array_walk($deny_cid, 'self::fixACL');
|
||||
array_walk($deny_gid, 'self::fixACL');
|
||||
|
||||
Contact::pruneUnavailable($allow_cid);
|
||||
|
||||
return [
|
||||
|
|
Loading…
Reference in a new issue