mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 03:37:24 +08:00
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:
@ -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: {
|
||||
|
Reference in New Issue
Block a user