Commit a6e4153878eda841b0a71e5e1666e6bed0a050ae
1 parent
a754f0b2
Exists in
spb-stable
and in
2 other branches
Check for the AD disabled flag in Access#allowed?
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
lib/gitlab/ldap/access.rb
| @@ -14,7 +14,11 @@ module Gitlab | @@ -14,7 +14,11 @@ module Gitlab | ||
| 14 | end | 14 | end |
| 15 | 15 | ||
| 16 | def allowed?(user) | 16 | def allowed?(user) |
| 17 | - !!Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) | 17 | + if Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) |
| 18 | + !Gitlab::LDAP::Person.ad_disabled?(user.extern_uid, adapter) | ||
| 19 | + else | ||
| 20 | + false | ||
| 21 | + end | ||
| 18 | rescue | 22 | rescue |
| 19 | false | 23 | false |
| 20 | end | 24 | end |