theodinproject icon indicating copy to clipboard operation
theodinproject copied to clipboard

Feature Request: Add a ban message

Open rlmoser99 opened this issue 1 year ago • 17 comments

Checks

  • [X] I have thoroughly read and understand The Odin Project Contributing Guide
  • [X] The title of this issue follows the Feature Request: brief description of feature request format, e.g. Feature Request: Add a dark mode to the website
  • [ ] Would you like to work on this issue?

Description of the Feature Request

When an admin bans a user, the user should receive an email to let them know their account was banned, possible reasons, and an invitation to contact us.

Acceptance criteria

  1. Sign in as a normal user with an email address that you have access to
  2. Go to the recipes project
  3. Flag one of the submissions
  4. Sign in to /admin_v2 (user: [email protected], password: password123)
  5. Visit the Flags page
  6. Select the most recent flag
  7. Click "Resolve flag", choose "Ban User" and then click "Submit"
  8. A notice should appear "Project submission owner has been banned" and a "Banned" badge should be under the flag heading
  9. The flag should be in the resolved list back on the Flag index page
  10. The email address used to sign in should receive an email with the ban template

Email Body:

Your account has been banned because you have broken one of our rules. For example:

  • One of your project submissions contained NSFW or other highly offensive images
  • One of your project submissions contained bigotry, such as racism, homophobia, hate speech
  • One of your project submissions were plagiarized

If you are unsure of the rules that were broken, you may reach out to us at [email protected]

Additional Comments

No response

rlmoser99 avatar Jul 28 '24 19:07 rlmoser99

Thanks for writing this up @rlmoser99. We're got two ban flows atm with both old and new admin operating concurrently. I'll put this on hold until we decommission old admin, that should happen within the next couple of weeks.

Theres two ways going about this...

1. Generic ban email

We don't ban users that often, and theres a good chance they know why they've been banned. We could send a generic ban email with instructions to reach out to the contact email if they'd like find out more / appeal it.

This would be the quickest and easiest way to do it. We'd just need a mailer and hook that into the ban action.

2. Custom message

A custom message is better, but also a lot more work that might not be worth it for the frequency of bans we have.

The UI will be the trickiest part. This is how we choose actions to perform against flags on admin v2: Screenshot 2024-07-29 at 09 46 54

We'd have to do something like Githubs review UI to include a message with a ban: Screenshot 2024-07-29 at 09 47 45

KevinMulhern avatar Jul 29 '24 08:07 KevinMulhern

Thanks for taking the time to write up the two options! You are right, we do not ban very often, so the first route might be the best option. We could add a list of possible reasons for the ban in the email that we send.

  • One of your project submissions contained NSFW or other highly offensive images
  • One of your project submissions contained bigotry, such as racism, homophobia, hate speech
  • One of your project submissions were plagiarized
  • Your account has suspicious votes on your project submissions
  • Your account has broken one of our rules (with a link)

rlmoser99 avatar Jul 29 '24 14:07 rlmoser99

It seems difficult to fit ban reasons into the existing UI, but I'm probably not being imaginative enough 😆

Where in the flag flow do you see ban reasons being slotted in?

KevinMulhern avatar Jul 29 '24 14:07 KevinMulhern

Sorry for being unclear. I was thinking in the email body of the generic ban email.

We could send a generic ban email with instructions to reach out to the contact email if they'd like find out more / appeal it.

rlmoser99 avatar Jul 29 '24 14:07 rlmoser99

Sorry, thats my bad, you were clear, I just misread. I think that could work really well, it covers all the bases 💪

KevinMulhern avatar Jul 29 '24 14:07 KevinMulhern

Hey @rlmoser99 this is unblocked and ready to work on. Would you like to update the acceptance criteria to match what we talked about with including reasons in the email?

For most of these stories, I've been writing acceptance criteria like this. The exact steps should better help demonstrate the flow we want and reduce any ambiguity.

KevinMulhern avatar Aug 05 '24 06:08 KevinMulhern

@KevinMulhern When you get a chance can you check out the updated AC? Do you think it would be useful to list Technical considerations, like where the email template files should go or point to another example of the email?

rlmoser99 avatar Aug 05 '24 18:08 rlmoser99

AC looks great to me @rlmoser99 💪

Do you think it would be useful to list Technical considerations, like where the email template files should go or point to another example of the email?

Yeah it could be, if you think it will help I'd say go for it. Our user mailer is probably the best example, but the template might not be the best to follow haha.

KevinMulhern avatar Aug 06 '24 05:08 KevinMulhern

Hey guys, can I take this one? @KevinMulhern @rlmoser99

OmarMoataz avatar Mar 19 '25 21:03 OmarMoataz

Can I being assigned for this?

ChuqiaoHuang avatar Apr 09 '25 17:04 ChuqiaoHuang

Sorry for the delay! great to see you still around @OmarMoataz, are you still interested in taking this one on? or do you want to pass it on to @ChuqiaoHuang?

KevinMulhern avatar Apr 11 '25 22:04 KevinMulhern

@KevinMulhern Thanks, Kevin! Great to see you too! I would still like to take it.

OmarMoataz avatar Apr 13 '25 01:04 OmarMoataz

All yours @OmarMoataz!

KevinMulhern avatar Apr 14 '25 01:04 KevinMulhern

Hey, is it [email protected] or [email protected]? @KevinMulhern @rlmoser99

OmarMoataz avatar Apr 24 '25 13:04 OmarMoataz

What do you guys think of this?

Image

OmarMoataz avatar Apr 24 '25 15:04 OmarMoataz

Minus the double email 😅

OmarMoataz avatar Apr 24 '25 15:04 OmarMoataz

Looking 🔥 @OmarMoataz!

A little bit of feedback:

  • Could we move the "For example:" to its own line above the reasons and have it the same font size/style as the reasons.
  • Could we bullet point the reasons?

Basically like this:

For example:

  • Reason 1
  • Reason 2

KevinMulhern avatar Apr 29 '25 21:04 KevinMulhern