File modules/cms/action/object/ObjectDelaclAction.class.php
Last commit: Sat Oct 17 02:16:28 2026 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths.
1 <?php 2 namespace cms\action\object; 3 use cms\action\Action; 4 use cms\action\Method; 5 use cms\action\ObjectAction; 6 use cms\model\Permission; 7 use cms\model\BaseObject; 8 use language\Messages; 9 use util\exception\SecurityException; 10 use util\Http; 11 12 class ObjectDelaclAction extends ObjectAction implements Method { 13 14 public function getRequiredPermission() 15 { 16 return Permission::ACL_GRANT; 17 } 18 19 20 public function post() { 21 $permission = new Permission($this->request->getText('aclid')); 22 $permission->load(); 23 24 // Nachschauen, ob der Benutzer ueberhaupt berechtigt ist, an 25 // diesem Objekt die ACLs zu aendern. 26 $o = new BaseObject( $permission->objectid ); 27 $o->load(); 28 29 if ( !$o->hasRight( Permission::ACL_GRANT ) ) 30 throw new SecurityException( 'no grant rights' ); // Da wollte uns wohl einer vereimern. 31 32 $permission->delete(); // Weg mit der ACL 33 34 $this->addNoticeFor( $o,Messages::DELETED ); 35 } 36 }
Downloadmodules/cms/action/object/ObjectDelaclAction.class.php
History Sat, 17 Oct 2026 02:16:28 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths. Sun, 30 Jan 2022 23:38:42 +0100 dankert Refactoring: Only 1 http-endpoint for both the UI and the API. Path "/api" is not available any more, all API data is served under "/". Sun, 5 Dec 2021 22:36:40 +0100 dankert Fixed deleting and inheriting of permissions. Sat, 6 Mar 2021 03:42:38 +0100 Jan Dankert New: Better permission checks. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. 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 14:49:58 +0100 Jan Dankert Fix: Action::addNotice() is replaced by Action::addNoticeFor() Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.