From c20f123e8018fdbdcd00fb7fc757f86407568ad6 Mon Sep 17 00:00:00 2001 From: Peter Bouda Date: Sat, 7 Dec 2024 12:13:09 +0000 Subject: [PATCH] FIX: Allow access for global keys --- config/initializers/scimitar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/scimitar.rb b/config/initializers/scimitar.rb index c9d5056..82e2c68 100644 --- a/config/initializers/scimitar.rb +++ b/config/initializers/scimitar.rb @@ -11,7 +11,7 @@ Rails.application.config.to_prepare do api_key = ApiKey.active.with_key(token).first allowed = false if api_key - allowed = api_key.api_key_scopes.any? { |s| s.resource == "scim" || s.action == "access_scim_endpoints" } + allowed = api_key.api_key_scopes.empty? || api_key.api_key_scopes.any? { |s| s.resource == "scim" || s.action == "access_scim_endpoints" } end allowed end