File modules/cms/action/folder/FolderAddAction.class.php

Last commit: Sun Jan 29 00:20:21 2023 +0100	Jan Dankert	New node type "Script".
1 <?php 2 namespace cms\action\folder; 3 use cms\action\FolderAction; 4 use cms\action\Method; 5 use cms\model\Permission; 6 use util\exception\SecurityException; 7 8 9 class FolderAddAction extends FolderAction implements Method { 10 11 public function view() { 12 $this->setTemplateVar('mayCreateFolder',$this->folder->hasRight( Permission::ACL_CREATE_FOLDER ) ); 13 $this->setTemplateVar('mayCreateFile' ,$this->folder->hasRight( Permission::ACL_CREATE_FILE ) ); 14 $this->setTemplateVar('mayCreateText' ,$this->folder->hasRight( Permission::ACL_CREATE_FILE ) ); 15 $this->setTemplateVar('mayCreateScript',$this->folder->hasRight( Permission::ACL_CREATE_FILE ) ); 16 $this->setTemplateVar('mayCreateImage' ,$this->folder->hasRight( Permission::ACL_CREATE_FILE ) ); 17 $this->setTemplateVar('mayCreatePage' ,$this->folder->hasRight( Permission::ACL_CREATE_PAGE ) ); 18 $this->setTemplateVar('mayCreateUrl' ,$this->folder->hasRight( Permission::ACL_CREATE_LINK ) ); 19 $this->setTemplateVar('mayCreateLink' ,$this->folder->hasRight( Permission::ACL_CREATE_LINK ) ); 20 21 } 22 23 public function post() { 24 } 25 26 27 public function checkAccess() 28 { 29 if ( ! parent::hasPermissionToAddAnyObject() ) 30 throw new SecurityException(); 31 } 32 }
Download modules/cms/action/folder/FolderAddAction.class.php
History Sun, 29 Jan 2023 00:20:21 +0100 Jan Dankert New node type "Script". Fri, 3 Dec 2021 23:27:44 +0100 dankert New: Only allowed methods are shown in the dropdown menu; Some security enhancements. Mon, 4 Jan 2021 19:03:18 +0100 Jan Dankert Refactoring: ACL class is renamed to Permission, because most RBAC/DMAC concepts are calling it a permission. Thu, 19 Nov 2020 12:36:44 +0100 Jan Dankert Fix: nextSubAction() is depracated and should not be used. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.