Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for user banning #224

Open
akprasad opened this issue Aug 25, 2022 · 1 comment
Open

Add support for user banning #224

akprasad opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels
project:proofing type:backend Python, Flask, etc. type:frontend JS, CSS, etc.

Comments

@akprasad
Copy link
Contributor

A user with admin permissions should be able to ban a user through the website. A banned user will not be able to make posts or proofing changes.

@akprasad akprasad added type:backend Python, Flask, etc. type:frontend JS, CSS, etc. project:proofing labels Aug 25, 2022
@AkshayPall
Copy link
Contributor

AkshayPall commented Sep 1, 2022

I think we want to separate deleting users from posts/revisions/etc as there may be useful revisions/posts they posted that we want to retain. In this way, we need to support the idea of a "Deleted" or "Removed" User (zombie delete) to anonymize submissions similar to Reddit.

Off the top of my head, these are the things needed to change

  • add a status field to the user table (ACTIVE=0, DELETED=1, BANNED=2)
  • update everywhere 'user' name is displayed to check for status
  • prevent logins if inactive user
  • update all 'post' queries to check if the user is active (in the race condition where a currently active user is banned - we want to prevent them from taking further actions right away)

@AkshayPall AkshayPall self-assigned this Sep 3, 2022
akprasad pushed a commit that referenced this issue Sep 23, 2022
1/3 PRs for #224, ensuring that a user who has been banned/deleted
recently will no longer be able to interact with the site.

The next 2 PRs will be to (1) Update all views for other users so they
no longer see the usernames of deleted/banned users and (2) Add support
for banning + deleting users (as admin or yourself).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:proofing type:backend Python, Flask, etc. type:frontend JS, CSS, etc.
Projects
None yet
Development

No branches or pull requests

2 participants