Commit 1f902c24 authored by Marvin Frick's avatar Marvin Frick
Browse files

fixes the `block_removed_ldap_users` rake task

In e23a26a (and later 1bc9936) the API for Gitlab::LDAP::Adapter was
changed. I assume this rake task was an oversight in the refactoring of
the changed class.

While being on it, I noticed that already blocked users cannot be
blocked again.
parent 7ad0f084a5b7
......@@ -92,11 +92,11 @@ namespace :gitlab do
User.ldap.each do |ldap_user|
print "#{} (#{ldap_user.extern_uid}) ..."
if { |access| access.allowed?(ldap_user) }
if Gitlab::LDAP::Access.allowed?(ldap_user)
puts " [OK]".green
if block_flag
ldap_user.block! unless ldap_user.blocked?
puts " [BLOCKED]".red
puts " [NOT IN LDAP]".yellow
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment