Skip to content

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-list-before snippet-list-after
Snippet snippet-before snippet-after

How to set up and validate locally

  1. Enable the following feature flag in the rails console:
> Feature.enable(:hide_snippets_of_banned_users)
  1. Log-in as any non-admin user and create a personal & project snippet
  2. In the rails console, ban the user that you just logged in as:
> user = User.find_by(username: 'XX')
> user.ban!
  1. 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.

Edited by Hinam Mehra

Merge request reports