From 4d5be463f61fb21e4876663c34129a448d5d5374 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 3 Jan 2025 16:25:21 +0100 Subject: [PATCH] Use lambda to dynamically evaluate allowed user api key client scopes (#30544) --- app/models/user_api_key_client_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user_api_key_client_scope.rb b/app/models/user_api_key_client_scope.rb index a3f62f67810..110efbb17e0 100644 --- a/app/models/user_api_key_client_scope.rb +++ b/app/models/user_api_key_client_scope.rb @@ -5,7 +5,7 @@ class UserApiKeyClientScope < ActiveRecord::Base validates :name, inclusion: { - in: UserApiKeyScope.all_scopes.keys.map(&:to_s), + in: -> { UserApiKeyScope.all_scopes.keys.map(&:to_s) }, message: "%{value} is not a valid scope", }