diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:02 +0000 |
commit | 8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (patch) | |
tree | 6bce184b45888ebeacc7060c84b892ecbd67a4ca /lib/gitlab/auth/ldap/config.rb | |
parent | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (diff) | |
download | gitlab-ce-8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth/ldap/config.rb')
-rw-r--r-- | lib/gitlab/auth/ldap/config.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/auth/ldap/config.rb b/lib/gitlab/auth/ldap/config.rb index eb1d0925c55..4bc0ceedae7 100644 --- a/lib/gitlab/auth/ldap/config.rb +++ b/lib/gitlab/auth/ldap/config.rb @@ -21,6 +21,14 @@ module Gitlab Gitlab.config.ldap.enabled end + def self.sign_in_enabled? + enabled? && !prevent_ldap_sign_in? + end + + def self.prevent_ldap_sign_in? + Gitlab.config.ldap.prevent_ldap_sign_in + end + def self.servers Gitlab.config.ldap['servers']&.values || [] end |