mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-10 07:24:25 +02:00
Fix module permissions for hooks
(cherry picked from commit 21b75e624ed39a7756fd45c56a6dac7b1f2becc0) Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
parent
6970b79fd7
commit
eca2dd7b9f
@ -263,7 +263,7 @@ class Hook
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (self::$hooks[$name] as $key => $hook) {
|
foreach (self::$hooks[$name] as $key => $hook) {
|
||||||
if (self::hasPermission($key)) {
|
if (self::hasPermission($hook)) {
|
||||||
if (self::createInstance($name, $key) === null) {
|
if (self::createInstance($name, $key) === null) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ class Hook
|
|||||||
|
|
||||||
if (self::has($name)) {
|
if (self::has($name)) {
|
||||||
foreach (self::$hooks[$name] as $key => $hook) {
|
foreach (self::$hooks[$name] as $key => $hook) {
|
||||||
if (self::hasPermission($key)) {
|
if (self::hasPermission($hook)) {
|
||||||
return self::createInstance($name, $key);
|
return self::createInstance($name, $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -309,6 +309,8 @@ class Hook
|
|||||||
self::$hooks[$name] = array();
|
self::$hooks[$name] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$class = ltrim($class, ClassLoader::NAMESPACE_SEPARATOR);
|
||||||
|
|
||||||
self::$hooks[$name][$key] = $class;
|
self::$hooks[$name][$key] = $class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user