Skip to content

Improve consistency of admin user dropdown actions

Peter Hegman requested to merge peterhegman/admin-user-actions-cleanup into master

📖 What does this MR do?

This MR is preparation for #332846 (closed). In that issue we will be moving the admin actions on the individual user view from cards to the same dropdown used by the user list view. To prepare for that this MR does the following:

  1. Adds missing information about what each action does
  2. Adds confirmation modals to the Approve and Reject actions
  3. Fixes the button variants to conform to Pajamas design system action hierarchy guidelines
  4. Removes an unnecessary div around the dropdown items to improve the semantics of the markup

💻 Local testing

  1. Login as an admin (root on GDK)
  2. Navigate to Menu -> Admin -> Users
  3. Use the dropdown on the right of the table to select an action

Banned action

The banned action is behind a feature flag. Currently banning a user does the same thing as blocking a user, but in the future it will remove all comments, issues, MRs, etc.

  • bin/rails console
  • Feature.enable(:ban_user_feature_flag)

📷 Screenshots

Action Individual user view Users list before Users list after
Activate Screen_Shot_2021-07-07_at_12.13.45_PM Screen_Shot_2021-07-07_at_12.21.14_PM Screen_Shot_2021-07-07_at_11.54.24_AM
Approve Screen_Shot_2021-07-07_at_12.15.11_PM N/A Screen_Shot_2021-07-07_at_11.54.53_AM
Ban Screen_Shot_2021-07-07_at_12.15.49_PM Screen_Shot_2021-07-07_at_12.22.42_PM Screen_Shot_2021-07-07_at_11.55.56_AM
Block Screen_Shot_2021-07-07_at_12.16.01_PM Screen_Shot_2021-07-07_at_12.22.59_PM Screen_Shot_2021-07-07_at_11.56.16_AM
Deactivate Screen_Shot_2021-07-07_at_12.16.43_PM Screen_Shot_2021-07-07_at_12.23.40_PM Screen_Shot_2021-07-07_at_11.56.43_AM
Reject Screen_Shot_2021-07-07_at_12.14.55_PM N/A Screen_Shot_2021-07-07_at_11.57.24_AM
Unban Screen_Shot_2021-07-07_at_12.17.15_PM Screen_Shot_2021-07-07_at_12.24.27_PM Screen_Shot_2021-07-07_at_11.57.59_AM
Unblock Screen_Shot_2021-07-07_at_12.17.32_PM Screen_Shot_2021-07-07_at_12.24.51_PM Screen_Shot_2021-07-07_at_11.58.23_AM

🚦 Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports

Loading