File modules/cms/action/project/ProjectEditAction.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\project; 3 use cms\action\Action; 4 use cms\action\Method; 5 use cms\action\ProjectAction; 6 use cms\model\Folder; 7 use cms\model\Permission; 8 use util\exception\SecurityException; 9 10 class ProjectEditAction extends ProjectAction implements Method { 11 12 public function view() { 13 14 $this->setTemplateVar('name' ,$this->project->name); 15 $this->setTemplateVar('projectid' ,$this->project->projectid); 16 $this->setTemplateVar('rootobjectid' ,$this->project->getRootObjectId()); 17 $this->setTemplateVar('is_project_admin',$this->userIsProjectAdmin()); 18 } 19 20 21 22 23 /** 24 * the root object must be readable by the current user. 25 */ 26 public function checkAccess() { 27 $rootFolderId = $this->project->getRootObjectId(); 28 29 $rootFolder = new Folder( $rootFolderId ); 30 $rootFolder->load(); 31 32 if ( ! $rootFolder->hasRight( Permission::ACL_READ ) ) 33 throw new SecurityException(); 34 } 35 36 }
Download modules/cms/action/project/ProjectEditAction.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. Fri, 3 Dec 2021 22:14:36 +0100 dankert Fix: Check rights for adding a project. Sun, 14 Mar 2021 22:29:56 +0100 Jan Dankert Refactoring: Clearer access check. Sat, 6 Mar 2021 03:42:38 +0100 Jan Dankert New: Better permission checks. Sat, 20 Feb 2021 01:34:41 +0100 Jan Dankert New: Publish-switch for templates. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.