chore: remove enabled check
This commit is contained in:
@@ -22,7 +22,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
||||
env['omniauth.params']['account_id'] = account_id
|
||||
|
||||
# Find SAML settings for this account
|
||||
settings = AccountSamlSettings.find_by(account_id: account_id, enabled: true)
|
||||
settings = AccountSamlSettings.find_by(account_id: account_id)
|
||||
|
||||
if settings
|
||||
# Configure the strategy options dynamically
|
||||
|
||||
@@ -73,7 +73,7 @@ class SamlUserBuilder
|
||||
def apply_role_mappings(account_user, account)
|
||||
return if saml_groups.blank?
|
||||
|
||||
saml_settings = AccountSamlSettings.find_by(account_id: account.id, enabled: true)
|
||||
saml_settings = AccountSamlSettings.find_by(account_id: account.id)
|
||||
return if saml_settings&.role_mappings.blank?
|
||||
|
||||
saml_settings.role_mappings.each do |group_name, mapping|
|
||||
|
||||
+1
-1
@@ -61,6 +61,6 @@ module Enterprise::DeviseOverrides::OmniauthCallbacksController
|
||||
account = Account.find_by(id: account_id)
|
||||
return false unless account.feature_enabled?('saml')
|
||||
|
||||
AccountSamlSettings.find_by(account_id: account_id, enabled: true).present?
|
||||
AccountSamlSettings.find_by(account_id: account_id).present?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user