1<?php
2
3namespace dokuwiki\Action;
4
5use dokuwiki\Action\Exception\ActionAclRequiredException;
6
7/**
8 * Class AbstractAclAction
9 *
10 * An action that requires the ACL subsystem to be enabled (eg. useacl=1)
11 *
12 * @package dokuwiki\Action
13 */
14abstract class AbstractAclAction extends AbstractAction {
15
16    /** @inheritdoc */
17    public function checkPreconditions() {
18        parent::checkPreconditions();
19        global $conf;
20        global $auth;
21        if(!$conf['useacl']) throw new ActionAclRequiredException();
22        if(!$auth) throw new ActionAclRequiredException();
23    }
24
25}
26