Apply column restrictions to the board

This commit is contained in:
Frederic Guillot
2016-09-08 22:33:16 -04:00
parent fedf4ea2de
commit 75470c7242
14 changed files with 383 additions and 169 deletions

View File

@@ -28,11 +28,21 @@ class BoardAjaxController extends BaseController
}
$values = $this->request->getJson();
$canMoveTask = $this->columnMoveRestrictionModel->isAllowed(
$project_id,
$this->helper->user->getProjectUserRole($project_id),
$values['src_column_id'],
$values['dst_column_id']
);
if (! $canMoveTask) {
throw new AccessForbiddenException("You don't have the permission to move this task");
}
$result =$this->taskPositionModel->movePosition(
$project_id,
$values['task_id'],
$values['column_id'],
$values['dst_column_id'],
$values['position'],
$values['swimlane_id']
);