File modules/cms/action/pageelement/PageelementPubAction.class.php
Last commit: Sat Mar 6 03:42:38 2021 +0100 Jan Dankert New: Better permission checks.
1 <?php 2 namespace cms\action\pageelement; 3 use cms\action\Method; 4 use cms\action\PageelementAction; 5 use cms\model\Permission; 6 use util\exception\SecurityException; 7 8 class PageelementPubAction extends PageelementAction implements Method { 9 10 protected function getRequiredPagePermission() 11 { 12 return Permission::ACL_PUBLISH; 13 } 14 15 public function view() { 16 } 17 public function post() { 18 if ( !$this->page->hasRight( Permission::ACL_PUBLISH ) ) 19 throw new SecurityException( 'no right for publish' ); 20 21 $this->publishPage(); 22 } 23 }
Downloadmodules/cms/action/pageelement/PageelementPubAction.class.php
History Sat, 6 Mar 2021 03:42:38 +0100 Jan Dankert New: Better permission checks. 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. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.