Commit dadc36aa authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Add guard clause to git over http authentication

parent 92a46add
......@@ -9,6 +9,7 @@ module Gitlab
class Authentication < Gitlab::Auth::OAuth::Authentication
def login(login, password)
return false unless Gitlab::CurrentSettings.password_authentication_enabled_for_git?
return false unless user.allow_password_authentication_for_git?
return user if user&.valid_password?(password)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment