Merge pull request #3096 from Icinga/feature/role-all-users

Apply role to all users if the role is defined with users=*
This commit is contained in:
lippserd 2017-11-16 20:22:52 +01:00 committed by GitHub
commit 6f9e18cd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}