summaryrefslogtreecommitdiff
path: root/app/Core/Security
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-08 20:44:03 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-08 20:44:03 -0400
commitfedf4ea2de21fcf95fc5aa942cedc7924865f160 (patch)
treed2dd83bd08de6284c737bbfab47699ed1ef1d984 /app/Core/Security
parentdded773749e869893a00865cf2183a7f0c684038 (diff)
Custom project roles inherit from project members
Diffstat (limited to 'app/Core/Security')
-rw-r--r--app/Core/Security/Role.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Core/Security/Role.php b/app/Core/Security/Role.php
index cb45a8af..c16d4094 100644
--- a/app/Core/Security/Role.php
+++ b/app/Core/Security/Role.php
@@ -50,6 +50,18 @@ class Role
}
/**
+ * Check if the given role is custom or not
+ *
+ * @access public
+ * @param string $role
+ * @return bool
+ */
+ public function isCustomProjectRole($role)
+ {
+ return ! empty($role) && $role !== self::PROJECT_MANAGER && $role !== self::PROJECT_MEMBER && $role !== self::PROJECT_VIEWER;
+ }
+
+ /**
* Get role name
*
* @access public