summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKartikey Tanna <tannakartikey@gmail.com>2019-06-18 16:18:14 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-06-18 16:18:14 +0000
commit53af3e6b9e6fd221f2b6da1f6029017cf4a23831 (patch)
treee8d9bc09eb215b0a2b8fcb4a0a4f4aaedff23557 /lib
parentc8f18c50a8e3bf9de66552be46ecd093c65572a7 (diff)
downloadgitlab-ce-53af3e6b9e6fd221f2b6da1f6029017cf4a23831.tar.gz
#57815 Password authentication disabled for UltraAuth users
Disabled password authentication for the users registered using omniauth-ultraauth strategy
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth/o_auth/provider.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/auth/o_auth/provider.rb b/lib/gitlab/auth/o_auth/provider.rb
index 9fdf3324db3..3d44c83736a 100644
--- a/lib/gitlab/auth/o_auth/provider.rb
+++ b/lib/gitlab/auth/o_auth/provider.rb
@@ -40,6 +40,10 @@ module Gitlab
name.to_s.start_with?('ldap')
end
+ def self.ultraauth_provider?(name)
+ name.to_s.eql?('ultraauth')
+ end
+
def self.sync_profile_from_provider?(provider)
return true if ldap_provider?(provider)