diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-01 11:04:08 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-01 11:04:08 +0400 |
commit | 73b92f85bcd6c213b845cc997843a969cf0906cf (patch) | |
tree | 15f5a46b4cc81c064d58d58b8fee38672721ea20 /lib | |
parent | 88d3e97e502f0be4f01fed100a06e04b2e0f2017 (diff) | |
parent | f7aba277e7971668172196da74f946e5a48aabc3 (diff) |
Merge branch 'add_active_directory_ldap_option' into 'master'
Add active directory ldap option
Fixes #1557
See merge request !1139
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ldap/access.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb index c054b6f5865..d2235d2e3bc 100644 --- a/lib/gitlab/ldap/access.rb +++ b/lib/gitlab/ldap/access.rb @@ -28,7 +28,9 @@ module Gitlab def allowed?(user) if Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) - !Gitlab::LDAP::Person.disabled_via_active_directory?(user.extern_uid, adapter) + if Gitlab.config.ldap.active_directory + !Gitlab::LDAP::Person.disabled_via_active_directory?(user.extern_uid, adapter) + end else false end |