From 56e792df9b9afa931f6d06a8594e8d9ef7b20090 Mon Sep 17 00:00:00 2001 From: Jamie Dunstan Date: Thu, 13 Jul 2023 16:02:32 +0100 Subject: [PATCH] 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` --- app/models/api_key_scope.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/api_key_scope.rb b/app/models/api_key_scope.rb index f6662815b7e..27f9162035a 100644 --- a/app/models/api_key_scope.rb +++ b/app/models/api_key_scope.rb @@ -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, },