diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-05-14 18:32:40 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-05-14 18:32:40 +0200 |
commit | a6e4153878eda841b0a71e5e1666e6bed0a050ae (patch) | |
tree | 8ef2dff6850e311c52893414fe19df07964f9974 | |
parent | a754f0b2205d4f09092c8c7c032ad944a229be8f (diff) | |
download | gitlab-ce-a6e4153878eda841b0a71e5e1666e6bed0a050ae.tar.gz |
Check for the AD disabled flag in Access#allowed?
-rw-r--r-- | lib/gitlab/ldap/access.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb index 8f492e5c012..71931b79f62 100644 --- a/lib/gitlab/ldap/access.rb +++ b/lib/gitlab/ldap/access.rb @@ -14,7 +14,11 @@ module Gitlab end def allowed?(user) - !!Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) + if Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) + !Gitlab::LDAP::Person.ad_disabled?(user.extern_uid, adapter) + else + false + end rescue false end |