permissions: Use a comma-separated list as config instead of the `permission_*' directives
Permissions are now set using a comma-separated list of permissions using the `permissions' config because the `users' and `groups' are comma-separated lists too.
This commit is contained in:
parent
266936b9b5
commit
084691570e
|
@ -52,12 +52,8 @@ class AdmissionLoader
|
|||
return $permissions;
|
||||
}
|
||||
foreach ($config as $section) {
|
||||
if ($this->match($section, $username, $groups)) {
|
||||
foreach ($section as $key => $value) {
|
||||
if (strpos($key, 'permission') === 0) {
|
||||
$permissions = array_merge($permissions, String::trimSplit($value));
|
||||
}
|
||||
}
|
||||
if ($this->match($section, $username, $groups) && isset($section->permissions)) {
|
||||
$permissions += String::trimSplit($section->permissions);
|
||||
}
|
||||
}
|
||||
return $permissions;
|
||||
|
|
Loading…
Reference in New Issue