From 00cdc609d113fedf977da1d55136dc4d699fb308 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 20 Sep 2014 12:52:48 +0200 Subject: Extract project permissions to a separate class --- app/Controller/Base.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/Controller/Base.php') 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(); } } -- cgit v1.2.3