diff options
author | Toon Claes <toon@iotcl.com> | 2017-07-07 10:20:46 +0300 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-07-07 10:30:14 +0300 |
commit | acbad6d8372a820487376e7011004796b28a763f (patch) | |
tree | 6bc54814a95e3099ded494130dd9f210410b904d /app/services/quick_actions | |
parent | 8a47c720e3ed117403c55389bd8d6a5411dba842 (diff) |
Remove /reassign quick action
/reassign should only work when multiple assignees are available. And
since this is only the case for GitLab EE, remove it from CE.
This was picked using 517c97eb12e44f354787313dd35ac7a1642f5b20 of gitlab-ee.
Diffstat (limited to 'app/services/quick_actions')
-rw-r--r-- | app/services/quick_actions/interpret_service.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index e4dfe87e614..6f82159e6c7 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -146,32 +146,6 @@ module QuickActions end end - desc do - "Change assignee#{'(s)' if issuable.allows_multiple_assignees?}" - end - explanation do |users| - users = issuable.allows_multiple_assignees? ? users : users.take(1) - "Change #{'assignee'.pluralize(users.size)} to #{users.map(&:to_reference).to_sentence}." - end - params do - issuable.allows_multiple_assignees? ? '@user1 @user2' : '@user' - end - condition do - issuable.persisted? && - current_user.can?(:"admin_#{issuable.to_ability_name}", project) - end - parse_params do |assignee_param| - extract_users(assignee_param) - end - command :reassign do |users| - @updates[:assignee_ids] = - if issuable.allows_multiple_assignees? - users.map(&:id) - else - [users.last.id] - end - end - desc 'Set milestone' explanation do |milestone| "Sets the milestone to #{milestone.to_reference}." if milestone |