diff options
Diffstat (limited to 'app/Api')
-rw-r--r-- | app/Api/Base.php | 3 | ||||
-rw-r--r-- | app/Api/Me.php | 5 | ||||
-rw-r--r-- | app/Api/Project.php | 1 | ||||
-rw-r--r-- | app/Api/Task.php | 6 |
4 files changed, 15 insertions, 0 deletions
diff --git a/app/Api/Base.php b/app/Api/Base.php index 17c7f79f..fe78d99d 100644 --- a/app/Api/Base.php +++ b/app/Api/Base.php @@ -19,6 +19,7 @@ abstract class Base extends \Core\Base 'getMyActivityStream', 'createMyPrivateProject', 'getMyProjectsList', + 'getMyOverdueTasks', ); private $both_allowed_procedures = array( @@ -37,6 +38,8 @@ abstract class Base extends \Core\Base 'createTask', 'updateTask', 'getBoard', + 'getProjectActivity', + 'getOverdueTasksByProject', ); public function checkProcedurePermission($is_user, $procedure) diff --git a/app/Api/Me.php b/app/Api/Me.php index 29a8052a..bc721c09 100644 --- a/app/Api/Me.php +++ b/app/Api/Me.php @@ -52,4 +52,9 @@ class Me extends Base { return $this->projectPermission->getMemberProjects($this->userSession->getId()); } + + public function getMyOverdueTasks() + { + return $this->taskFinder->getOverdueTasksByUser($this->userSession->getId()); + } } diff --git a/app/Api/Project.php b/app/Api/Project.php index c3ae503c..8ed382cb 100644 --- a/app/Api/Project.php +++ b/app/Api/Project.php @@ -58,6 +58,7 @@ class Project extends Base public function getProjectActivity($project_id) { + $this->checkProjectPermission($project_id); return $this->projectActivity->getProject($project_id); } diff --git a/app/Api/Task.php b/app/Api/Task.php index 946a9e88..23a8c5bf 100644 --- a/app/Api/Task.php +++ b/app/Api/Task.php @@ -34,6 +34,12 @@ class Task extends Base { return $this->taskFinder->getOverdueTasks(); } + + public function getOverdueTasksByProject($project_id) + { + $this->checkProjectPermission($project_id); + return $this->taskFinder->getOverdueTasksByProject($project_id); + } public function openTask($task_id) { |