Commit ed3cda00 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '17862-honour-limit-in-ldap-check' into 'master'

Resolve "gitlab:setup rake task fails on 8.8.1 source install"

_Originally opened at !4788 by @rickettm._

- - -

## What does this MR do?

Fix bug #15344, so that the limit parameter that is already passed in to the print_users function is actually used, rather than using a hardcoded value.

## Are there points in the code the reviewer needs to double check?

No, it is a trivial change.

## Why was this MR needed?

This bug causes 100 LDAP users to be displayed even when a different limit is given, which can be annoying.

## What are the relevant issue numbers?

Fixes #15344.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5364
parent d5cf8894
...@@ -30,6 +30,7 @@ v 8.10.0 (unreleased) ...@@ -30,6 +30,7 @@ v 8.10.0 (unreleased)
- Upgrade to Rails 4.2.7. !5236 - Upgrade to Rails 4.2.7. !5236
- Extend exposed environment variables for CI builds - Extend exposed environment variables for CI builds
- Allow to pull code with deploy key from public projects - Allow to pull code with deploy key from public projects
- Use limit parameter rather than hardcoded value in `ldap:check` rake task (Mike Ricketts)
- Add Sidekiq queue duration to transaction metrics. - Add Sidekiq queue duration to transaction metrics.
- Add a new column `artifacts_size` to table `ci_builds` !4964 - Add a new column `artifacts_size` to table `ci_builds` !4964
- Let Workhorse serve format-patch diffs - Let Workhorse serve format-patch diffs
......
...@@ -784,7 +784,7 @@ namespace :gitlab do ...@@ -784,7 +784,7 @@ namespace :gitlab do
servers.each do |server| servers.each do |server|
puts "Server: #{server}" puts "Server: #{server}"
Gitlab::LDAP::Adapter.open(server) do |adapter| Gitlab::LDAP::Adapter.open(server) do |adapter|
users = adapter.users(adapter.config.uid, '*', 100) users = adapter.users(adapter.config.uid, '*', limit)
users.each do |user| users.each do |user|
puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}" puts "\tDN: #{user.dn}\t #{adapter.config.uid}: #{user.uid}"
end end
......
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