From 0ae33991bfc48e7cd1d6c96815ba01c6bae208aa Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 19 Dec 2016 21:14:32 +0100 Subject: [PATCH] Hook: allow all on CLI (cherry picked from commit 361bfc50814d7138e4c5da60c98837c35093edbf) Signed-off-by: Eric Lippmann --- library/Icinga/Application/Hook.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icinga/Application/Hook.php b/library/Icinga/Application/Hook.php index 33761a342..3a158a57c 100644 --- a/library/Icinga/Application/Hook.php +++ b/library/Icinga/Application/Hook.php @@ -184,6 +184,10 @@ class Hook */ protected static function hasPermission($class) { + if (Icinga::app()->isCli()) { + return true; + } + return Auth::getInstance()->hasPermission( Manager::MODULE_PERMISSION_NS . self::extractModuleName($class) );