mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FEATURE: Adding some more api scopes (#20420)
Adds api scopes for - deleting a topic - deleting a post - listing tags
This commit is contained in:
parent
a433b30650
commit
5dbdcb3f23
@ -31,6 +31,9 @@ class ApiKeyScope < ActiveRecord::Base
|
||||
actions: %w[topics#update topics#status],
|
||||
params: %i[topic_id category_id],
|
||||
},
|
||||
delete: {
|
||||
actions: %w[topics#destroy],
|
||||
},
|
||||
read: {
|
||||
actions: %w[topics#show topics#feed topics#posts],
|
||||
params: %i[topic_id],
|
||||
@ -55,6 +58,14 @@ class ApiKeyScope < ActiveRecord::Base
|
||||
actions: %w[posts#update],
|
||||
params: %i[id],
|
||||
},
|
||||
delete: {
|
||||
actions: %w[posts#destroy],
|
||||
},
|
||||
},
|
||||
tags: {
|
||||
list: {
|
||||
actions: %w[tags#index],
|
||||
},
|
||||
},
|
||||
categories: {
|
||||
list: {
|
||||
|
@ -4699,10 +4699,14 @@ en:
|
||||
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.
|
||||
update: Update a topic. Change the title, category, tags, status, archetype, featured_link etc.
|
||||
delete: Delete a topic.
|
||||
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.
|
||||
delete: Delete a post.
|
||||
tags:
|
||||
list: List tags.
|
||||
categories:
|
||||
list: Get a list of categories.
|
||||
show: Get a single category by id.
|
||||
|
@ -423,6 +423,7 @@ RSpec.describe Admin::ApiController do
|
||||
"users",
|
||||
"email",
|
||||
"posts",
|
||||
"tags",
|
||||
"uploads",
|
||||
"user_status",
|
||||
"global",
|
||||
|
Loading…
Reference in New Issue
Block a user