Commit a6e41538 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Check for the AD disabled flag in Access#allowed?

parent a754f0b2
...@@ -14,7 +14,11 @@ module Gitlab ...@@ -14,7 +14,11 @@ module Gitlab
end end
def allowed?(user) 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 rescue
false false
end 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