Skip to content

Commit

Permalink
Add openid_connect to provider whitelist (#5364)
Browse files Browse the repository at this point in the history
  • Loading branch information
scouillard authored Aug 4, 2023
1 parent 30e1796 commit ba8b07a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/v1/migrations/external_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create_user
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])
Expand Down Expand Up @@ -119,7 +119,7 @@ def create_room
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')
Expand Down

0 comments on commit ba8b07a

Please sign in to comment.