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