RoleForm: Really only show that everything is allowed if `*` is granted

fixes #4622
This commit is contained in:
Johannes Meyer 2021-12-14 10:15:01 +01:00
parent 354099b4e2
commit e2a51e75e5
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ class RoleForm extends RepositoryForm
'users' => $role->users,
'groups' => $role->groups,
'unrestricted' => $role->unrestricted,
self::WILDCARD_NAME => (bool) preg_match('~(?<!/)\*~', $role->permissions)
self::WILDCARD_NAME => (bool) preg_match('~(?>^|,)\*(?>$|,)~', $role->permissions)
];
if (! empty($role->permissions) || ! empty($role->refusals)) {