DEV: Add api scoping for updating topics. (#16101)

This change adds a new api scope for updating topics.

See: https://meta.discourse.org/t/219805
This commit is contained in:
Blake Erickson 2022-03-04 10:44:56 -07:00 committed by GitHub
parent 94ea1afc43
commit 07e80b52ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ class ApiKeyScope < ActiveRecord::Base
}, },
topics: { topics: {
write: { actions: %w[posts#create], params: %i[topic_id] }, write: { actions: %w[posts#create], params: %i[topic_id] },
update: { actions: %w[topics#update], params: %i[topic_id] },
read: { read: {
actions: %w[topics#show topics#feed topics#posts], actions: %w[topics#show topics#feed topics#posts],
params: %i[topic_id], aliases: { topic_id: :id } params: %i[topic_id], aliases: { topic_id: :id }

View File

@ -4213,6 +4213,7 @@ en:
topics: topics:
read: Read a topic or a specific post in it. RSS is also supported. read: Read a topic or a specific post in it. RSS is also supported.
write: Create a new topic or post to an existing one. write: Create a new topic or post to an existing one.
update: Update a topic. Change the title, category, tags, etc.
read_lists: Read topic lists like top, new, latest, etc. RSS is also supported. read_lists: Read topic lists like top, new, latest, etc. RSS is also supported.
wordpress: Necessary for the WordPress wp-discourse plugin to work. wordpress: Necessary for the WordPress wp-discourse plugin to work.
posts: posts: