xref: /dokuwiki/inc/Action/AbstractAclAction.php (revision 90fb952c4c30c09c8446076ba05991c89a3f0b01)
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
17    /** @inheritdoc */
18    public function checkPreconditions()
19    {
20        parent::checkPreconditions();
21        global $conf;
22        global $auth;
23        if (!$conf['useacl']) throw new ActionAclRequiredException();
24        if (!$auth) throw new ActionAclRequiredException();
25    }
26}
27