mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-23 08:09:37 -05:00
parent
59d721fdbc
commit
72fc8b03c9
1 changed files with 4 additions and 6 deletions
|
|
@ -240,15 +240,13 @@ class Metadata
|
||||||
|
|
||||||
public function hasOneOfTheAllowedRoles(User $user)
|
public function hasOneOfTheAllowedRoles(User $user)
|
||||||
{
|
{
|
||||||
foreach ($this->listAllowedRoles() as $roles) {
|
foreach ($this->listAllowedRoles() as $roleName) {
|
||||||
foreach ($roles as $roleName) {
|
|
||||||
foreach ($user->getRoles() as $role) {
|
foreach ($user->getRoles() as $role) {
|
||||||
if ($role->getName() === $roleName) {
|
if ($role->getName() === $roleName) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue