Skip to content

A platform for community discussion. Free, open, simple.

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

Blake Erickson4ecfac39a662
diff --git a/app/models/api_key_scope.rb b/app/models/api_key_scope.rb
index eb1346f72ed..9c077008767 100644
--- a/app/models/api_key_scope.rb
+++ b/app/models/api_key_scope.rb
@@ -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: {
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 8e0a1796965..7bcf49d5e6c 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -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: