mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-07 21:05:18 +02:00
Merge pull request #2688 from Icinga/fix-module-permissions-for-hooks-2686
Fix module permissions for hooks
This commit is contained in:
commit
21b75e624e
@ -263,7 +263,7 @@ class Hook
|
||||
}
|
||||
|
||||
foreach (self::$hooks[$name] as $key => $hook) {
|
||||
if (self::hasPermission($key)) {
|
||||
if (self::hasPermission($hook)) {
|
||||
if (self::createInstance($name, $key) === null) {
|
||||
return array();
|
||||
}
|
||||
@ -286,7 +286,7 @@ class Hook
|
||||
|
||||
if (self::has($name)) {
|
||||
foreach (self::$hooks[$name] as $key => $hook) {
|
||||
if (self::hasPermission($key)) {
|
||||
if (self::hasPermission($hook)) {
|
||||
return self::createInstance($name, $key);
|
||||
}
|
||||
}
|
||||
@ -309,6 +309,8 @@ class Hook
|
||||
self::$hooks[$name] = array();
|
||||
}
|
||||
|
||||
$class = ltrim($class, ClassLoader::NAMESPACE_SEPARATOR);
|
||||
|
||||
self::$hooks[$name][$key] = $class;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user