diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-01-04 21:14:57 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-01-04 21:14:57 -0500 |
commit | d1d04d6feeebeba2aea5333d7a4229fcec799f75 (patch) | |
tree | 51da4416973b2b60f3d50d5acddf2c4c258c1ff3 /app/Model/Acl.php | |
parent | 07b07c7697439dc0e6bdf87f65b4b3bd46f6bfc8 (diff) |
Add subtasks export and move export actions to a specific controller
Diffstat (limited to 'app/Model/Acl.php')
-rw-r--r-- | app/Model/Acl.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Model/Acl.php b/app/Model/Acl.php index 9c3f5e06..599ff055 100644 --- a/app/Model/Acl.php +++ b/app/Model/Acl.php @@ -50,7 +50,8 @@ class Acl extends Base 'analytic' => '*', 'board' => array('movecolumn', 'edit', 'update', 'add', 'remove'), 'category' => '*', - 'project' => array('edit', 'update', 'exporttasks', 'exportdailyprojectsummary', 'share', 'integration', 'users', 'alloweverybody', 'allow', 'setowner', 'revoke', 'duplicate', 'disable', 'enable'), + 'export' => array('tasks', 'subtasks', 'summary'), + 'project' => array('edit', 'update', 'share', 'integration', 'users', 'alloweverybody', 'allow', 'setowner', 'revoke', 'duplicate', 'disable', 'enable'), 'swimlane' => '*', ); @@ -179,7 +180,7 @@ class Acl extends Base // Check project member permissions if ($this->isMemberAction($controller, $action)) { - return $this->isMemberActionAllowed($project_id); + return $project_id > 0 && $this->projectPermission->isMember($project_id, $this->userSession->getId()); } // Other applications actions are allowed @@ -188,11 +189,10 @@ class Acl extends Base public function isManagerActionAllowed($project_id) { - return $project_id > 0 && $this->projectPermission->isManager($project_id, $this->userSession->getId()); - } + if ($this->userSession->isAdmin()) { + return true; + } - public function isMemberActionAllowed($project_id) - { - return $project_id > 0 && $this->projectPermission->isMember($project_id, $this->userSession->getId()); + return $project_id > 0 && $this->projectPermission->isManager($project_id, $this->userSession->getId()); } } |