Add ability to Trust and Untrust a user from the users admin panel
What does this MR do and why?
Follow up to !131812 (merged) and !131102 (merged)
This adds a Trusted
users tab to the users admin panel as well as the ability to trust/untrust a user on that panel via the actions drop-down.
Trusted users can create issues, snippets, and notes that are not checked for spam. By default, a user is not trusted.
Database
There are 2 new queries, the first is here in User.
The query plan for that is here
The second query is here in Admin::UsersController
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Log into your GDK as an admin
- Visit
/admin/users
and ensure there's aTrusted
tab - On the "Active" tab, click the action menu (3 vertical dots) on the right side of the row for a given user, select "Trust user" and confirm
- Go to the "Trusted" tab (
/admin/users?filter=trusted
) - Ensure the newly trusted user is there and that there's an
Untrust user
action available in the dropdown action menu. - Click the
Untrust user
button and confirm the dialog - Ensure that the user no longer shows up in the
Trusted
tab
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.
Edited by Ethan Urie