From ba8b07aab153d78c354ec96d758b3d4613294cb1 Mon Sep 17 00:00:00 2001 From: Samuel Couillard <43917914+scouillard@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:07:12 -0400 Subject: [PATCH] Add openid_connect to provider whitelist (#5364) --- 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 6abf1025..923f657a 100644 --- a/app/controllers/api/v1/migrations/external_controller.rb +++ b/app/controllers/api/v1/migrations/external_controller.rb @@ -84,7 +84,7 @@ module Api user_hash = user_params.to_h # Re-write LDAP and Google to greenlight - user_hash[:provider] = %w[greenlight ldap google].include?(user_hash[:provider]) ? 'greenlight' : user_hash[:provider] + user_hash[:provider] = %w[greenlight ldap google openid_connect].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]) @@ -119,7 +119,7 @@ module Api room_hash = room_params.to_h # Re-write LDAP and Google to greenlight - room_hash[:provider] = %w[greenlight ldap google].include?(room_hash[:provider]) ? 'greenlight' : room_hash[:provider] + room_hash[:provider] = %w[greenlight ldap google openid_connect].include?(room_hash[:provider]) ? 'greenlight' : room_hash[:provider] unless room_hash[:provider] == 'greenlight' || Tenant.exists?(name: room_hash[:provider]) return render_error(status: :bad_request, errors: 'Provider does not exist') -- GitLab