FEATURE: Extend topic update API scope to allow status updates (#19654)

Allow an API key created with topic:update API scope to make updates to
topic status. This change also introduces an optional category_id scope
param.
This commit is contained in:
Selase Krakani
2023-01-13 01:21:04 +00:00
committed by GitHub
parent 8a1b50f62d
commit 73ec80893d
5 changed files with 103 additions and 5 deletions

View File

@ -59,7 +59,7 @@ class RouteMatcher
params.all? do |param|
param_alias = aliases&.[](param)
allowed_values = [allowed_param_values[param.to_s]].flatten
allowed_values = [allowed_param_values.fetch(param.to_s, [])].flatten
value = requested_params[param.to_s]
alias_value = requested_params[param_alias.to_s]