Skip to content

Fix URLs in user_auto_banned_email

Eugie Limpin requested to merge update_auto_banned_email into master

What does this MR do and why?

Resolves https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/46.

This MR updates the user_auto_banned email to have the correct URLs to pages where:

  • the admin can unban banned users
  • the admin can update settings for auto-banning

The URLs depend on whether the user is banned from an instance or from a namespace.


Files are also moved under ee/ since the email is sent by features that are EE-only.

Screenshots or screen recordings

When user is banned from an instance

before after
Screen_Shot_2022-07-25_at_1.35.31_PM Screen_Shot_2022-07-25_at_1.40.53_PM

When user is banned from a namespace

before after
Screen_Shot_2022-07-25_at_1.27.23_PM Screen_Shot_2022-07-25_at_1.29.07_PM
Screen_Shot_2022-07-25_at_1.43.34_PM Screen_Shot_2022-07-25_at_1.32.20_PM

How to set up and validate locally

When user is banned from an instance

  1. Go to localhost:3000/rails/mailers/notify/user_auto_banned_instance_email.html?locale=en
  2. Hover on here and validate that the URL ends in /admin/application_settings/reporting

When user is banned from a namespace

  1. Go to localhost:3000/rails/mailers/notify/user_auto_banned_namespace_email.html?locale=en
  2. Hover on unban them and validate that the URL ends in /groups/<group-name>/-/group_members?tabbed=banned
  3. Hover on here and validate that the URL ends in /groups/<group-name>/-/settings/reporting

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 Eugie Limpin

Merge request reports

Loading