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

[Enhancement]: Move bans to a dedicated collection #106

Open
1 task done
jonbarrow opened this issue Aug 9, 2024 · 0 comments
Open
1 task done

[Enhancement]: Move bans to a dedicated collection #106

jonbarrow opened this issue Aug 9, 2024 · 0 comments
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase

Comments

@jonbarrow
Copy link
Member

Checked Existing

  • I have checked the repository for duplicate issues.

What enhancement would you like to see?

Create a bans Mongo collection for tracking bans. This gives us more granular control over how bans are handled. Currently all bans are simply a flag set on the relevant data (game server account, PNID, console, etc.), which has a few of issues:

  1. Lacks context in the data itself
  2. Lacks an action history
  3. Lacks the ability to smoothly handle temporary bans
  4. Lacks the ability to do per-service/per-game bans

Moving bans to a dedicated collection would allow us to address these issues in the following ways:

  1. Store ban details in the ban document itself. Right now we typically have an okay paper trail through other means, usually user reports, but this is obviously an imperfect way to handle things and context can, and does, get lost at times making appeals harder. By storing the details surrounding the ban in the document, we can easily reference this later if need be
  2. By storing details about the ban time, issuer, etc. in the ban document itself we can keep a log/history of mod/developer actions. By keeping past ban documents around, even those which have been appealed, we can also keep a history of user punishments. Both of these would allow us to find mod abuse/incorrect behavior, as well as track users who have been banned/appealed multiple times
  3. We can easily handle temporary bans by either using Mongo's built in TTL feature, or by manually handling expiration dates. Using the TTL would be the most straight forward, but it's designed for deleting documents and can't update them instead. Deleting the documents would prevent an accurate history from being made, so manually handling the dates should be the way to go
  4. By storing data about the scope of the ban in the document we can easily handle per-service/per-game bans

Any other details to share? (OPTIONAL)

The implementation of this would likely be several ban document types all being stored in a single bans collection, for simplicity. Each document type would have data about the type for easy querying

@jonbarrow jonbarrow added enhancement An update to an existing part of the codebase awaiting-approval Topic has not been approved or denied approved The topic is approved by a developer and removed awaiting-approval Topic has not been approved or denied labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The topic is approved by a developer enhancement An update to an existing part of the codebase
Projects
Status: Todo
Development

No branches or pull requests

1 participant