FEATURE: Adding some more api scopes (#20420)

Adds api scopes for

- deleting a topic
- deleting a post
- listing tags
This commit is contained in:
Blake Erickson
2023-02-23 08:33:29 -07:00
committed by GitHub
parent a433b30650
commit 5dbdcb3f23
3 changed files with 16 additions and 0 deletions

View File

@ -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: {