mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
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:
@ -35,8 +35,8 @@ class ApiKeyScope < ActiveRecord::Base
|
|||||||
actions: %w[topics#destroy],
|
actions: %w[topics#destroy],
|
||||||
},
|
},
|
||||||
read: {
|
read: {
|
||||||
actions: %w[topics#show topics#feed topics#posts],
|
actions: %w[topics#show topics#feed topics#posts topics#show_by_external_id],
|
||||||
params: %i[topic_id],
|
params: %i[topic_id external_id],
|
||||||
aliases: {
|
aliases: {
|
||||||
topic_id: :id,
|
topic_id: :id,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user