FEATURE: Add separate api scope for topic status (#19978)

This will allow us more granular control over changing a topic status.
For example you can now force the scope to only allow closing topics in
a specific category. This means that the same scope can't be used to
re-open topics, or close topics in a different category.
This commit is contained in:
Blake Erickson
2023-01-27 08:05:29 -07:00
committed by GitHub
parent e03f6057ec
commit 4ecfac39a6
2 changed files with 5 additions and 0 deletions

View File

@ -45,6 +45,10 @@ class ApiKeyScope < ActiveRecord::Base
category_id: :category_slug_path_with_id,
},
},
status: {
actions: %w[topics#status],
params: %i[topic_id category_id status enabled],
},
},
posts: {
edit: {