Commit 458b5a10 authored by Chantal Rollison's avatar Chantal Rollison

Backport of 5942-extract-ee-specific-files

parent 68afa03a
...@@ -7,6 +7,19 @@ module IssuableActions ...@@ -7,6 +7,19 @@ module IssuableActions
before_action :authorize_admin_issuable!, only: :bulk_update before_action :authorize_admin_issuable!, only: :bulk_update
end end
def permitted_keys
[
:issuable_ids,
:assignee_id,
:milestone_id,
:state_event,
:subscription_event,
label_ids: [],
add_label_ids: [],
remove_label_ids: []
]
end
def show def show
respond_to do |format| respond_to do |format|
format.html format.html
...@@ -140,24 +153,15 @@ module IssuableActions ...@@ -140,24 +153,15 @@ module IssuableActions
end end
def bulk_update_params def bulk_update_params
permitted_keys = [ permitted_keys_array = permitted_keys.dup
:issuable_ids,
:assignee_id,
:milestone_id,
:state_event,
:subscription_event,
label_ids: [],
add_label_ids: [],
remove_label_ids: []
]
if resource_name == 'issue' if resource_name == 'issue'
permitted_keys << { assignee_ids: [] } permitted_keys_array << { assignee_ids: [] }
else else
permitted_keys.unshift(:assignee_id) permitted_keys_array.unshift(:assignee_id)
end end
params.require(:update).permit(permitted_keys) params.require(:update).permit(permitted_keys_array)
end end
def resource_name def resource_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment