summaryrefslogtreecommitdiff
path: root/app/helpers/auth_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r--app/helpers/auth_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index 1f1ff75359d..a57e27d23c8 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -145,10 +145,14 @@ module AuthHelper
IdentityProviderPolicy.new(current_user, provider).can?(:link)
end
+ def allow_admin_mode_password_authentication_for_web?
+ current_user.allow_password_authentication_for_web? && !current_user.password_automatically_set?
+ end
+
extend self
end
-AuthHelper.prepend_if_ee('EE::AuthHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
+AuthHelper.prepend_if_ee('EE::AuthHelper')
# The methods added in EE should be available as both class and instance
# methods, just like the methods provided by `AuthHelper` itself.