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:
Blake Erickson
2024-03-14 15:24:54 -06:00
committed by GitHub
parent c986f9a947
commit 70c23f11a9
3 changed files with 25 additions and 0 deletions

View File

@ -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],