mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
Explicit param permit and assignment cleanup.
This commit is contained in:
@ -668,9 +668,10 @@ class TopicsController < ApplicationController
|
|||||||
raise ActionController::ParameterMissing.new(:topic_ids)
|
raise ActionController::ParameterMissing.new(:topic_ids)
|
||||||
end
|
end
|
||||||
|
|
||||||
operation = params.require(:operation)
|
operation = params
|
||||||
operation.permit!
|
.require(:operation)
|
||||||
operation = operation.to_h.symbolize_keys
|
.permit(:type, :group, :category_id, :notification_level_id, :tags)
|
||||||
|
.to_h.symbolize_keys
|
||||||
|
|
||||||
raise ActionController::ParameterMissing.new(:operation_type) if operation[:type].blank?
|
raise ActionController::ParameterMissing.new(:operation_type) if operation[:type].blank?
|
||||||
operator = TopicsBulkAction.new(current_user, topic_ids, operation, group: operation[:group])
|
operator = TopicsBulkAction.new(current_user, topic_ids, operation, group: operation[:group])
|
||||||
|
Reference in New Issue
Block a user