chore: remove enabled check

This commit is contained in:
Shivam Mishra
2025-08-28 16:39:12 +05:30
parent f17de99d1b
commit 184b735846
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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|
@@ -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