Apply role to all users if the role is defined with users=*
If the users directive contains at least one single asterisk, the role is applied to all users. So, this supports roles which define users=username, ..., * and users=* refs #3095
This commit is contained in:
parent
166f27b947
commit
f495b390da
|
@ -28,6 +28,9 @@ class AdmissionLoader
|
|||
$username = strtolower($username);
|
||||
if (! empty($section->users)) {
|
||||
$users = array_map('strtolower', StringHelper::trimSplit($section->users));
|
||||
if (in_array('*', $users)) {
|
||||
return true;
|
||||
}
|
||||
if (in_array($username, $users)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue