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
path: root/lib
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-11-12 15:40:36 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-11-12 15:40:36 +0300
commitdfcc59a92b9c3740cf4c1ee34a8fb45753bfbe20 (patch)
tree6c780b75415192caf87d6393b4d0479210f8ee31 /lib
parent53f05343f55c1324fb73a63b972db674050941ed (diff)
parent1f902c2464a4f5c68f1b42be597d4e3e25a32130 (diff)
Merge pull request #8291 from MrMarvin/fix/ldap_cleanup_task
fixes the `block_removed_ldap_users` rake task
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/cleanup.rake4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake
index 63dcdc52370..189ad6090a4 100644
--- a/lib/tasks/gitlab/cleanup.rake
+++ b/lib/tasks/gitlab/cleanup.rake
@@ -92,11 +92,11 @@ namespace :gitlab do
User.ldap.each do |ldap_user|
print "#{ldap_user.name} (#{ldap_user.extern_uid}) ..."
- if Gitlab::LDAP::Access.open { |access| access.allowed?(ldap_user) }
+ if Gitlab::LDAP::Access.allowed?(ldap_user)
puts " [OK]".green
else
if block_flag
- ldap_user.block!
+ ldap_user.block! unless ldap_user.blocked?
puts " [BLOCKED]".red
else
puts " [NOT IN LDAP]".yellow