diff options
Diffstat (limited to 'inc/Menu')
-rw-r--r-- | inc/Menu/Item/Admin.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/Menu/Item/Admin.php b/inc/Menu/Item/Admin.php index 7302f0f34..e5506c220 100644 --- a/inc/Menu/Item/Admin.php +++ b/inc/Menu/Item/Admin.php @@ -11,14 +11,18 @@ class Admin extends AbstractItem { /** @inheritdoc */ public function __construct() { - global $INFO; parent::__construct(); $this->svg = DOKU_INC . 'lib/images/menu/settings.svg'; + } + + /** @inheritdoc */ + public function visibleInContext($ctx) + { + global $INFO; + if(!$INFO['ismanager']) return false; - if(!$INFO['ismanager']) { - throw new \RuntimeException("admin is for managers only"); - } + return parent::visibleInContext($ctx); } } |