about summary refs log tree commit diff stats
path: root/wiki/inc/Menu/Item/Admin.php
blob: 7302f0f34fd42eabc96f886668d8efb691c8a0a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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");
        }
    }

}