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 parent::checkPreconditions(); 20 global $conf; 21 global $auth; 22 if(!$conf['useacl']) throw new ActionAclRequiredException(); 23 if(!$auth) throw new ActionAclRequiredException(); 24 } 25} 26