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