1<?php
2
3namespace dokuwiki\Action;
4
5use dokuwiki\Ui;
6
7/**
8 * Class Denied
9 *
10 * Show the access denied screen
11 *
12 * @package dokuwiki\Action
13 */
14class Denied extends AbstractAclAction
15{
16    /** @inheritdoc */
17    public function minimumPermission()
18    {
19        return AUTH_NONE;
20    }
21
22    /** @inheritdoc */
23    public function tplContent()
24    {
25        global $INPUT;
26        $this->showBanner();
27        if (empty($INPUT->server->str('REMOTE_USER')) && actionOK('login')) {
28            (new Ui\Login)->show();
29        }
30    }
31
32    /**
33     * Display error on denied pages
34     *
35     * @author   Andreas Gohr <andi@splitbrain.org>
36     *
37     * @return void
38     */
39    public function showBanner()
40    {
41        // print intro
42        print p_locale_xhtml('denied');
43    }
44
45}
46