Skip to content

Commit

Permalink
add SAML to the list of matched providers during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ithanil committed Mar 3, 2024
1 parent 5b5ff5d commit b82a30a
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 @@ -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])
Expand Down

0 comments on commit b82a30a

Please sign in to comment.