Add project restrictions for custom roles

This commit is contained in:
Frederic Guillot
2016-09-11 16:08:03 -04:00
parent a0227cad69
commit d8f6d85683
25 changed files with 700 additions and 288 deletions

View File

@@ -28,14 +28,8 @@ 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) {
if (! $this->helper->projectRole->canMoveTask($project_id, $values['src_column_id'], $values['dst_column_id'])) {
throw new AccessForbiddenException(e("You don't have the permission to move this task"));
}