Skip to content

Use the hidden field to hide the MRs created by banned users

What does this MR do and why?

This MR makes use of the hidden attribute in the merge-requests index to hide the MRs created by the banned users. The admins users can always see the MRs created by the banned users. This feature is guarded by a feature_flag hide_merge_requests_from_banned_users.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Make sure the elasticsearch is enabled
  2. Make sure the feature hide_merge_requests_from_banned_users is enabled
Feature.enable :hide_merge_requests_from_banned_users
  1. Log in as an admin user and go to the admin panel and ban a user who has some MRs
  2. Search globally for the MRs created by this banned user
  3. You should see the MRs created by the banned user
  4. Now logout as an admin user or open a new incognito window, and search again for the MR
  5. You should not see the MRs created by the banned user
  6. Now logged in as a non-admin user and search again. You should not see the MRs created by the banned user

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #394746

Edited by Ravi Kumar

Merge request reports

Loading