Add LDAP Blocked variant of blocked badge
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.
The LDAP Blocked user has a different set of User Administration options (cannot be unblocked from this view)
The "Normal" Blocked user can be unblocked from this view
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.
- Designate (or create) a user to test
- In a rails console, find the user (ex.
u = User.find_by_username('wrench')
) - Set the user to ldap_block (ex.
u.ldap_block!
) - Navigate to the users page in the admin view.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.