xref: /dokuwiki/inc/Action/AbstractAclAction.php (revision 64ab5140f7b1c996873fbfe9bab26d9202fbb773)
1*64ab5140SAndreas Gohr<?php
2*64ab5140SAndreas Gohr
3*64ab5140SAndreas Gohrnamespace dokuwiki\Action;
4*64ab5140SAndreas Gohr
5*64ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionAclRequiredException;
6*64ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionException;
7*64ab5140SAndreas Gohr
8*64ab5140SAndreas Gohrabstract class AbstractAclAction extends AbstractAction {
9*64ab5140SAndreas Gohr
10*64ab5140SAndreas Gohr    /** @inheritdoc */
11*64ab5140SAndreas Gohr    public function checkPermissions() {
12*64ab5140SAndreas Gohr        parent::checkPermissions();
13*64ab5140SAndreas Gohr        global $conf;
14*64ab5140SAndreas Gohr        if(!$conf['useacl']) throw new ActionAclRequiredException();
15*64ab5140SAndreas Gohr    }
16*64ab5140SAndreas Gohr
17*64ab5140SAndreas Gohr}
18