diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-07 13:21:10 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-06-07 13:21:10 +0000 |
commit | 3094f1c1f2986d82994f3da988c3ae3eb5780c14 (patch) | |
tree | 9e7f8dcadd43c1a900a294673486eb20211e3739 | |
parent | 428bbc925b7ef27905b758e015461505e6544499 (diff) | |
parent | 458b5a10ddb4432f1abd5cb0e1b92fc591f4e966 (diff) | |
download | gitlab-ce-3094f1c1f2986d82994f3da988c3ae3eb5780c14.tar.gz |
Merge branch 'ccr/extract_EE_code_5942' into 'master'
Backport of 5942-extract-ee-specific-files
See merge request gitlab-org/gitlab-ce!19285
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index c925b4aada5..d04eb192129 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -7,6 +7,19 @@ module IssuableActions before_action :authorize_admin_issuable!, only: :bulk_update 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 respond_to do |format| format.html @@ -140,24 +153,15 @@ module IssuableActions end def bulk_update_params - permitted_keys = [ - :issuable_ids, - :assignee_id, - :milestone_id, - :state_event, - :subscription_event, - label_ids: [], - add_label_ids: [], - remove_label_ids: [] - ] + permitted_keys_array = permitted_keys.dup if resource_name == 'issue' - permitted_keys << { assignee_ids: [] } + permitted_keys_array << { assignee_ids: [] } else - permitted_keys.unshift(:assignee_id) + permitted_keys_array.unshift(:assignee_id) end - params.require(:update).permit(permitted_keys) + params.require(:update).permit(permitted_keys_array) end def resource_name |