diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-09-20 12:52:48 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-09-20 12:52:48 +0200 |
commit | 00cdc609d113fedf977da1d55136dc4d699fb308 (patch) | |
tree | 3e54049861fb2698cd4501bae829c62093d4c982 /app/Controller/Base.php | |
parent | 5f96af82f26967f4614b89322a82a59cb48bd2a3 (diff) |
Extract project permissions to a separate class
Diffstat (limited to 'app/Controller/Base.php')
-rw-r--r-- | app/Controller/Base.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 383b22d1..cc180158 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -26,6 +26,7 @@ use Model\LastLogin; * @property \Model\LastLogin $lastLogin * @property \Model\Notification $notification * @property \Model\Project $project + * @property \Model\ProjectPermission $projectPermission * @property \Model\SubTask $subTask * @property \Model\Task $task * @property \Model\TaskHistory $taskHistory @@ -211,7 +212,7 @@ abstract class Base { if ($this->acl->isRegularUser()) { - if ($project_id > 0 && ! $this->project->isUserAllowed($project_id, $this->acl->getUserId())) { + if ($project_id > 0 && ! $this->projectPermission->isUserAllowed($project_id, $this->acl->getUserId())) { $this->forbidden(); } } |