summaryrefslogtreecommitdiff
path: root/app/Api/Authorization/TaskFileAuthorization.php
diff options
context:
space:
mode:
authori00171 <anton.delitsch@implema.se>2016-06-26 18:35:25 +0200
committeri00171 <anton.delitsch@implema.se>2016-06-26 18:35:25 +0200
commit47039d32c84ba699867920d2c3cb47a34b199b9d (patch)
tree4fbc2ec34889baeab00085e0509055dca7daee6a /app/Api/Authorization/TaskFileAuthorization.php
parent911be6ed00c1ece5d9ef2c16e80899bb7bffad67 (diff)
parentc110dffefe259c13e60193fb81ebb9d4b79504de (diff)
Merge branch 'master' of https://github.com/fguillot/kanboard
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));
+ }
+ }
+}