diff options
Diffstat (limited to 'app/Helper/ProjectRoleHelper.php')
-rw-r--r-- | app/Helper/ProjectRoleHelper.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/Helper/ProjectRoleHelper.php b/app/Helper/ProjectRoleHelper.php index fd7a690b..508dc9e0 100644 --- a/app/Helper/ProjectRoleHelper.php +++ b/app/Helper/ProjectRoleHelper.php @@ -172,6 +172,24 @@ class ProjectRoleHelper extends Base } /** + * Return true if the user can change assignee + * + * @public + * @param array $task + * @return bool + */ + public function canChangeAssignee(array $task) + { + $role = $this->getProjectUserRole($task['project_id']); + + if ($this->hasRestriction($task['project_id'], $role, ProjectRoleRestrictionModel::RULE_TASK_CHANGE_ASSIGNEE)) { + return false; + } + + return true; + } + + /** * Check project access * * @param string $controller |