summaryrefslogtreecommitdiff
path: root/app/Model/ProjectRoleModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectRoleModel.php')
-rw-r--r--app/Model/ProjectRoleModel.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/Model/ProjectRoleModel.php b/app/Model/ProjectRoleModel.php
index 82f22806..ed86d6ed 100644
--- a/app/Model/ProjectRoleModel.php
+++ b/app/Model/ProjectRoleModel.php
@@ -17,7 +17,7 @@ class ProjectRoleModel extends Base
/**
* Get list of project roles
- *
+ *
* @param int $project_id
* @return array
*/
@@ -70,9 +70,14 @@ class ProjectRoleModel extends Base
public function getAllWithRestrictions($project_id)
{
$roles = $this->getAll($project_id);
- $restrictions = $this->columnMoveRestrictionModel->getAll($project_id);
- $restrictions = array_column_index($restrictions, 'role_id');
- array_merge_relation($roles, $restrictions, 'restrictions', 'role_id');
+
+ $column_restrictions = $this->columnMoveRestrictionModel->getAll($project_id);
+ $column_restrictions = array_column_index($column_restrictions, 'role_id');
+ array_merge_relation($roles, $column_restrictions, 'column_restrictions', 'role_id');
+
+ $project_restrictions = $this->projectRoleRestrictionModel->getAll($project_id);
+ $project_restrictions = array_column_index($project_restrictions, 'role_id');
+ array_merge_relation($roles, $project_restrictions, 'project_restrictions', 'role_id');
return $roles;
}