Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2016-04-05 22:33:37 +0300
committerGabriel Mazetto <gabriel@gitlab.com>2016-04-05 22:34:31 +0300
commit5ee6badade3c453c7090e9c1f1f4d636c5bb068e (patch)
tree2bdc59fa820512c44eff139c9eabd558c6a8bdd4 /lib/gitlab/ldap
parent4a01b5e293ccb358d77ac1a25b92d14fd913a4d7 (diff)
Unblocks user when active_directory is disabled and it can be found
Diffstat (limited to 'lib/gitlab/ldap')
-rw-r--r--lib/gitlab/ldap/access.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb
index da4435c7308..f2b649e50a2 100644
--- a/lib/gitlab/ldap/access.rb
+++ b/lib/gitlab/ldap/access.rb
@@ -33,7 +33,10 @@ module Gitlab
def allowed?
if ldap_user
- return true unless ldap_config.active_directory
+ unless ldap_config.active_directory
+ user.activate if user.ldap_blocked?
+ return true
+ end
# Block user in GitLab if he/she was blocked in AD
if Gitlab::LDAP::Person.disabled_via_active_directory?(user.ldap_identity.extern_uid, adapter)