about summary refs log tree commit diff stats
path: root/wiki/inc/Menu/Item/Admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/inc/Menu/Item/Admin.php')
-rw-r--r--wiki/inc/Menu/Item/Admin.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/wiki/inc/Menu/Item/Admin.php b/wiki/inc/Menu/Item/Admin.php
new file mode 100644
index 0000000..7302f0f
--- /dev/null
+++ b/wiki/inc/Menu/Item/Admin.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace dokuwiki\Menu\Item;
+
+/**
+ * Class Admin
+ *
+ * Opens the Admin screen. Only shown to managers or above
+ */
+class Admin extends AbstractItem {
+
+    /** @inheritdoc */
+    public function __construct() {
+        global $INFO;
+        parent::__construct();
+
+        $this->svg = DOKU_INC . 'lib/images/menu/settings.svg';
+
+        if(!$INFO['ismanager']) {
+            throw new \RuntimeException("admin is for managers only");
+        }
+    }
+
+}