mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
DEV: Add API scopes for post revisions (#26183)
This commit adds API scopes for reading, modifying, and deleting post revisions.
This commit is contained in:
@ -71,6 +71,20 @@ class ApiKeyScope < ActiveRecord::Base
|
||||
actions: %w[posts#latest],
|
||||
},
|
||||
},
|
||||
revisions: {
|
||||
read: {
|
||||
actions: %w[posts#latest_revision posts#revisions],
|
||||
params: %i[post_id],
|
||||
},
|
||||
modify: {
|
||||
actions: %w[posts#hide_revision posts#show_revision posts#revert],
|
||||
params: %i[post_id],
|
||||
},
|
||||
permanently_delete: {
|
||||
actions: %w[posts#permanently_delete_revisions],
|
||||
params: %i[post_id],
|
||||
},
|
||||
},
|
||||
tags: {
|
||||
list: {
|
||||
actions: %w[tags#index],
|
||||
|
Reference in New Issue
Block a user