summaryrefslogtreecommitdiff
path: root/app/Helper/BoardHelper.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-10 22:37:57 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-10 22:37:57 -0400
commit44f680cf2f1463721eb5bdb7eda4d3b339e63ba9 (patch)
treeed4aeef8b32dbd76277dacf864b028677bc10809 /app/Helper/BoardHelper.php
parent75470c72428c8d8f278d160369558ab31b137fb1 (diff)
Add ui to create new custom project roles and column restrictions
Diffstat (limited to 'app/Helper/BoardHelper.php')
-rw-r--r--app/Helper/BoardHelper.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/Helper/BoardHelper.php b/app/Helper/BoardHelper.php
index c3d28dc4..394d80b7 100644
--- a/app/Helper/BoardHelper.php
+++ b/app/Helper/BoardHelper.php
@@ -34,8 +34,14 @@ class BoardHelper extends Base
public function isDraggable(array $task)
{
if ($task['is_active'] == 1 && $this->helper->user->hasProjectAccess('BoardViewController', 'save', $task['project_id'])) {
- $srcColumnIds = $this->columnMoveRestrictionCacheDecorator->getAllSrcColumns($task['project_id']);
- return ! isset($srcColumnIds[$task['column_id']]);
+ $role = $this->helper->user->getProjectUserRole($task['project_id']);
+
+ if ($this->role->isCustomProjectRole($role)) {
+ $srcColumnIds = $this->columnMoveRestrictionCacheDecorator->getAllSrcColumns($task['project_id'], $role);
+ return ! isset($srcColumnIds[$task['column_id']]);
+ }
+
+ return true;
}
return false;