mirror of
https://github.com/discourse/discourse.git
synced 2025-03-27 18:55:39 +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:
parent
e03f6057ec
commit
4ecfac39a6
@ -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: {
|
||||
|
@ -4676,6 +4676,7 @@ en:
|
||||
write: Create a new topic or post to an existing one.
|
||||
update: Update a topic. Change the title, category, tags, status, archetype, featured_link etc.
|
||||
read_lists: Read topic lists like top, new, latest, etc. RSS is also supported.
|
||||
status: "Update a topic's status. Status: closed, archive, visisble, pinned. Enabled: true, false. Specify a category_id here and in the request payload to only allow status changes on topics in that category."
|
||||
posts:
|
||||
edit: Edit any post or a specific one.
|
||||
categories:
|
||||
|
Loading…
x
Reference in New Issue
Block a user