about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorCSDUMMI <31551856+CSDUMMI@users.noreply.github.com>2023-03-17 10:09:01 +0100
committerGitHub <noreply@github.com>2023-03-17 10:09:01 +0100
commitd75a1e5054bc51d00b2ded834887f0cac23537b4 (patch)
tree8a8dc62ff72a805519517ae3a9067d9c92283805 /app/controllers
parentbe9a4912d8e61123dfe77c921a58cc5e8e22ae6d (diff)
Link to the Identity provider's account settings from the account settings (#24100)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index cee2061b5..fb01abb93 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -16,6 +16,8 @@ class ApplicationController < ActionController::Base
   helper_method :current_theme
   helper_method :single_user_mode?
   helper_method :use_seamless_external_login?
+  helper_method :omniauth_only?
+  helper_method :sso_account_settings
   helper_method :whitelist_mode?
 
   rescue_from ActionController::ParameterMissing, Paperclip::AdapterRegistry::NoHandlerError, with: :bad_request
@@ -118,6 +120,14 @@ class ApplicationController < ActionController::Base
     Devise.pam_authentication || Devise.ldap_authentication
   end
 
+  def omniauth_only?
+    ENV['OMNIAUTH_ONLY'] == 'true'
+  end
+
+  def sso_account_settings
+    ENV.fetch('SSO_ACCOUNT_SETTINGS')
+  end
+
   def current_account
     return @current_account if defined?(@current_account)