From 44f680cf2f1463721eb5bdb7eda4d3b339e63ba9 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 10 Sep 2016 22:37:57 -0400 Subject: Add ui to create new custom project roles and column restrictions --- app/Helper/BoardHelper.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/Helper') 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; -- cgit v1.2.3