From ba9b62e5c031ba9469d524c1ca0057cdaa4dcb2f Mon Sep 17 00:00:00 2001 From: Jan Kessler Date: Fri, 27 Oct 2023 15:11:14 +0200 Subject: [PATCH] add SAML to the list of matched providers during migration --- app/controllers/api/v1/migrations/external_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/migrations/external_controller.rb b/app/controllers/api/v1/migrations/external_controller.rb index 39ab29703d..cce8c90696 100644 --- a/app/controllers/api/v1/migrations/external_controller.rb +++ b/app/controllers/api/v1/migrations/external_controller.rb @@ -81,8 +81,8 @@ def create_role def create_user user_hash = user_params.to_h - # Re-write LDAP and Google to greenlight - user_hash[:provider] = %w[greenlight ldap google openid_connect].include?(user_hash[:provider]) ? 'greenlight' : user_hash[:provider] + # Re-write list of providers to greenlight + user_hash[:provider] = %w[greenlight ldap google openid_connect saml].include?(user_hash[:provider]) ? 'greenlight' : user_hash[:provider] # Returns an error if the provider does not exist unless user_hash[:provider] == 'greenlight' || Tenant.exists?(name: user_hash[:provider])