FEATURE: Extend the topics:read API scope to allow read by external_id (#22536)

Allow an API key created with `topics:read` API scope to get a topic by `external_id`
This commit is contained in:
Jamie Dunstan 2023-07-13 16:02:32 +01:00 committed by GitHub
parent d7ef7b9c03
commit 56e792df9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,8 +35,8 @@ class ApiKeyScope < ActiveRecord::Base
actions: %w[topics#destroy],
},
read: {
actions: %w[topics#show topics#feed topics#posts],
params: %i[topic_id],
actions: %w[topics#show topics#feed topics#posts topics#show_by_external_id],
params: %i[topic_id external_id],
aliases: {
topic_id: :id,
},