[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Action/ -> AbstractAclAction.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Action;
   4  
   5  use 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   */
  14  abstract 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  }