Skip to content

Commit

Permalink
Merge branch 'master' into lowell/11054_frontend_pagination_table
Browse files Browse the repository at this point in the history
  • Loading branch information
va-bot committed Jun 27, 2019
2 parents 6d724d9 + 9a8adf9 commit 7e872f9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/models/tasks/colocated_task.rb
Expand Up @@ -51,11 +51,15 @@ def label

def available_actions(user)
if assigned_to == user
return available_actions_with_conditions([
Constants.TASK_ACTIONS.TOGGLE_TIMED_HOLD.to_h,
Constants.TASK_ACTIONS.ASSIGN_TO_PRIVACY_TEAM.to_h,
Constants.TASK_ACTIONS.CANCEL_TASK.to_h
])
base_actions = [
Constants.TASK_ACTIONS.TOGGLE_TIMED_HOLD.to_h,
Constants.TASK_ACTIONS.ASSIGN_TO_PRIVACY_TEAM.to_h,
Constants.TASK_ACTIONS.CANCEL_TASK.to_h
]

base_actions.push(Constants.TASK_ACTIONS.REASSIGN_TO_PERSON.to_h) if Colocated.singleton.user_is_admin?(user)

return available_actions_with_conditions(base_actions)
end

if task_is_assigned_to_user_within_organization?(user) && Colocated.singleton.admins.include?(user)
Expand Down

0 comments on commit 7e872f9

Please sign in to comment.