diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index fbd08bc4d0a..3a067f2332e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -600,8 +600,8 @@ class User < ActiveRecord::Base password_automatically_set? && allow_password_authentication? end - def require_personal_access_token_creation_for_git_auth? - return false if allow_password_authentication? || ldap_user? + def require_personal_access_token? + return false if current_application_settings.password_authentication_enabled? || ldap_user? PersonalAccessTokensFinder.new(user: self, impersonation: false, state: 'active').execute.none? end |