Skip to content

Indicate locked users in Admin Area

What does this MR do and why?

Related to #335032 (closed)

A user is locked after 10 failed login attempts. The lock expires after 10 minutes. An Admin can unlock a user from the Rails console or the Admin Area.

Previously there was no indication in the UI that a user is locked. This MR adds (Locked) after the user's name in the Admin Area.

This MR also documents the following:

  1. That a lock on a user expires after 10 minutes.
  2. How to unlock a user from the Admin Area.

There is a follow-up to add a Locked badge to the list view.

Screenshots or screen recordings

Before After
Screen_Shot_2022-01-09_at_4.34.54_PM Screen_Shot_2022-01-09_at_4.34.13_PM

How to set up and validate locally

  1. Sign in as an Admin.
  2. Navigate to /admin/users.
  3. Click on a user and make note of their username.
  4. In the Rails console (bin/rails console) run User.find_by_username(<Username from step 3>).update_column(:locked_at, DateTime.current).
  5. Refresh the page opened in step 3

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 Peter Hegman

Merge request reports