summaryrefslogtreecommitdiff
path: root/app/Helper/ProjectRoleHelper.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Helper/ProjectRoleHelper.php')
-rw-r--r--app/Helper/ProjectRoleHelper.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Helper/ProjectRoleHelper.php b/app/Helper/ProjectRoleHelper.php
index e1808be5..87f7fed2 100644
--- a/app/Helper/ProjectRoleHelper.php
+++ b/app/Helper/ProjectRoleHelper.php
@@ -36,7 +36,7 @@ class ProjectRoleHelper extends Base
public function isDraggable(array &$task)
{
if ($task['is_active'] == 1 && $this->helper->user->hasProjectAccess('BoardViewController', 'save', $task['project_id'])) {
- return $this->isSortableColumn($task['project_id'], $task['column_id'], 'src_column_id');
+ return $this->isSortableColumn($task['project_id'], $task['column_id']);
}
return false;
@@ -47,10 +47,9 @@ class ProjectRoleHelper extends Base
*
* @param int $project_id
* @param int $column_id
- * @param string $field
* @return bool
*/
- public function isSortableColumn($project_id, $column_id, $field)
+ public function isSortableColumn($project_id, $column_id)
{
$role = $this->getProjectUserRole($project_id);
@@ -58,7 +57,7 @@ class ProjectRoleHelper extends Base
$sortableColumns = $this->columnMoveRestrictionCacheDecorator->getSortableColumns($project_id, $role);
foreach ($sortableColumns as $column) {
- if ($column[$field] == $column_id) {
+ if ($column['src_column_id'] == $column_id || $column['dst_column_id'] == $column_id) {
return true;
}
}
@@ -92,6 +91,10 @@ class ProjectRoleHelper extends Base
if ($column['src_column_id'] == $src_column_id && $column['dst_column_id'] == $dst_column_id) {
return true;
}
+
+ if ($column['dst_column_id'] == $src_column_id && $column['src_column_id'] == $dst_column_id) {
+ return true;
+ }
}
return empty($sortableColumns);