Display spam icon to admins next to snippets of banned users
What does this MR do and why?
- Display spam icon to admins next to snippets of banned users
- Follows from !131725 (merged). This MR was reverted due to a mixed deployment issue which caused a QA spec to fail. The backend MR, !134048 (merged) has already been merged in a previous milestone.
- This MR copies the frontend changes from the previously merged MR.
Screenshots or screen recordings
Before | After | |
---|---|---|
Snippet List | ||
Snippet |
How to set up and validate locally
- Enable the following feature flag in the rails console:
> Feature.enable(:hide_snippets_of_banned_users)
- Log-in as any non-admin user and create a personal & project snippet
- In the rails console, ban the user that you just logged in as:
> user = User.find_by(username: 'XX')
> user.ban!
- Now, log-in as admin and navigate to the snippets created in step 2. You should see a spam icon next to them, in the snippets list and in the snippet itself.
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 Hinam Mehra