mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
Merge pull request #3558 from Icinga/fix/permission-test-in-hook-has
Fix permission test in Hook::has()
This commit is contained in:
commit
0c06ec7431
@ -75,11 +75,13 @@ class Hook
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$hook = self::$hooks[$name];
|
foreach (self::$hooks[$name] as $hook) {
|
||||||
// $hook is in the format key => value
|
if (self::hasPermission($hook)) {
|
||||||
$hook = reset($hook);
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return self::hasPermission($hook);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function normalizeHookName($name)
|
protected static function normalizeHookName($name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user