summaryrefslogtreecommitdiff
path: root/lib/gitlab/ldap/access.rb
diff options
context:
space:
mode:
authorAndriy Dyadyura <adyadyura@Andriys-MBP.lan>2016-01-14 15:54:15 +0100
committerAndriy Dyadyura <adyadyura@Andriys-MBP.lan>2016-01-14 15:54:15 +0100
commit3102575316e6eac937eb865346e0d78935c37362 (patch)
tree5434a52528390e18ac68ff705f19f8441a952f57 /lib/gitlab/ldap/access.rb
parente29ce9ac267e6724945b9558d069dda2b2ec2755 (diff)
parentb6ae2def2cb2b1da3ddcb3ceee556628a1147cc4 (diff)
downloadgitlab-ce-3102575316e6eac937eb865346e0d78935c37362.tar.gz
Diffstat (limited to 'lib/gitlab/ldap/access.rb')
-rw-r--r--lib/gitlab/ldap/access.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb
index b2bdbc10d7f..da4435c7308 100644
--- a/lib/gitlab/ldap/access.rb
+++ b/lib/gitlab/ldap/access.rb
@@ -37,15 +37,15 @@ module Gitlab
# 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)
- user.block
+ user.ldap_block
false
else
- user.activate if user.blocked? && !ldap_config.block_auto_created_users
+ user.activate if user.ldap_blocked?
true
end
else
# Block the user if they no longer exist in LDAP/AD
- user.block
+ user.ldap_block
false
end
rescue