Skip to content

Add LDAP Blocked variant of blocked badge

Wade Jenkins requested to merge wwjenkins-admin-ldapblockedusers-label into master

What does this MR do and why?

Add a variant of the Blocked Badge to specify when a user has been blocked because of LDAP. Blocked and Ldap_Blocked users present differently in terms of administration options, but the at-a-glance badges don't reflect the difference. The unlabeled difference caused trouble for me as a GitLab admin at a US Federal customer in the past.

Screenshots or screen recordings

Two users in the blocked users list, one "normal," one blocked by LDAP. blocked_users

The LDAP Blocked user has a different set of User Administration options (cannot be unblocked from this view) Wrench_admin_options

The "Normal" Blocked user can be unblocked from this view gentles_admin_options

How to set up and validate locally

Validation does not require LDAP to be configured. "ldap_blocked" is a valid state for a user even when there is no LDAP configuration or LDAP sync occurring.

  1. Designate (or create) a user to test
  2. In a rails console, find the user (ex. u = User.find_by_username('wrench'))
  3. Set the user to ldap_block (ex. u.ldap_block!)
  4. Navigate to the users page in the admin view.
  5. Find the user on the Blocked users list, and verify the LDAP Blocked badge is applied

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Wade Jenkins

Merge request reports

Loading