Skip to content
Snippets Groups Projects
Commit a6e41538 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Check for the AD disabled flag in Access#allowed?

parent a754f0b2
No related branches found
No related tags found
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment