1<?php 2 3namespace dokuwiki\Action; 4 5use dokuwiki\Ui; 6 7/** 8 * Class Denied 9 * 10 * Show the access denied screen 11 * 12 * @package dokuwiki\Action 13 */ 14class Denied extends AbstractAclAction 15{ 16 /** @inheritdoc */ 17 public function minimumPermission() 18 { 19 return AUTH_NONE; 20 } 21 22 /** @inheritdoc */ 23 public function tplContent() 24 { 25 $this->showBanner(); 26 if (empty($_SERVER['REMOTE_USER']) && actionOK('login')) { 27 (new Ui\Login)->show(); 28 } 29 } 30 31 /** 32 * Display error on denied pages 33 * 34 * @author Andreas Gohr <andi@splitbrain.org> 35 * 36 * @return void 37 */ 38 protected function showBanner() 39 { 40 // print intro 41 print p_locale_xhtml('denied'); 42 } 43 44} 45