summaryrefslogtreecommitdiff
path: root/app/Api/Authorization/SubtaskAuthorization.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api/Authorization/SubtaskAuthorization.php')
-rw-r--r--app/Api/Authorization/SubtaskAuthorization.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/Api/Authorization/SubtaskAuthorization.php b/app/Api/Authorization/SubtaskAuthorization.php
new file mode 100644
index 00000000..fcb57929
--- /dev/null
+++ b/app/Api/Authorization/SubtaskAuthorization.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Kanboard\Api\Authorization;
+
+/**
+ * Class SubtaskAuthorization
+ *
+ * @package Kanboard\Api\Authorization
+ * @author Frederic Guillot
+ */
+class SubtaskAuthorization extends ProjectAuthorization
+{
+ public function check($class, $method, $subtask_id)
+ {
+ if ($this->userSession->isLogged()) {
+ $this->checkProjectPermission($class, $method, $this->subtaskModel->getProjectId($subtask_id));
+ }
+ }
+}