xref: /dokuwiki/inc/Action/Login.php (revision 64ab5140f7b1c996873fbfe9bab26d9202fbb773)
1*64ab5140SAndreas Gohr<?php
2*64ab5140SAndreas Gohr/**
3*64ab5140SAndreas Gohr * Created by IntelliJ IDEA.
4*64ab5140SAndreas Gohr * User: andi
5*64ab5140SAndreas Gohr * Date: 2/10/17
6*64ab5140SAndreas Gohr * Time: 12:08 PM
7*64ab5140SAndreas Gohr */
8*64ab5140SAndreas Gohr
9*64ab5140SAndreas Gohrnamespace dokuwiki\Action;
10*64ab5140SAndreas Gohr
11*64ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionException;
12*64ab5140SAndreas Gohr
13*64ab5140SAndreas Gohrclass Login extends AbstractAclAction {
14*64ab5140SAndreas Gohr
15*64ab5140SAndreas Gohr    /** @inheritdoc */
16*64ab5140SAndreas Gohr    function minimumPermission() {
17*64ab5140SAndreas Gohr        return AUTH_NONE;
18*64ab5140SAndreas Gohr    }
19*64ab5140SAndreas Gohr
20*64ab5140SAndreas Gohr    /** @inheritdoc */
21*64ab5140SAndreas Gohr    public function checkPermissions() {
22*64ab5140SAndreas Gohr        global $INPUT;
23*64ab5140SAndreas Gohr        parent::checkPermissions();
24*64ab5140SAndreas Gohr        if($INPUT->server->has('REMOTE_USER')){
25*64ab5140SAndreas Gohr            // nothing to do
26*64ab5140SAndreas Gohr            throw new ActionException();
27*64ab5140SAndreas Gohr        }
28*64ab5140SAndreas Gohr        // FIXME auth login capabilities
29*64ab5140SAndreas Gohr    }
30*64ab5140SAndreas Gohr
31*64ab5140SAndreas Gohr    /** @inheritdoc */
32*64ab5140SAndreas Gohr    public function tplContent() {
33*64ab5140SAndreas Gohr        html_login();
34*64ab5140SAndreas Gohr    }
35*64ab5140SAndreas Gohr
36*64ab5140SAndreas Gohr}
37