More adjusted API tests
[dokuwiki.git] / inc / Action / AbstractAclAction.php
blob27b514d52f102fd85ab18170d68df49b389c0f59
1 <?php
3 namespace dokuwiki\Action;
5 use dokuwiki\Action\Exception\ActionAclRequiredException;
6 use dokuwiki\Extension\AuthPlugin;
8 /**
9 * Class AbstractAclAction
11 * An action that requires the ACL subsystem to be enabled (eg. useacl=1)
13 * @package dokuwiki\Action
15 abstract class AbstractAclAction extends AbstractAction
17 /** @inheritdoc */
18 public function checkPreconditions()
20 parent::checkPreconditions();
21 global $conf;
22 global $auth;
23 if (!$conf['useacl']) throw new ActionAclRequiredException();
24 if (!$auth instanceof AuthPlugin) throw new ActionAclRequiredException();