Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Admin: refactor global/site bans #98

Open
libertysoft3 opened this issue Mar 17, 2021 · 2 comments
Open

Admin: refactor global/site bans #98

libertysoft3 opened this issue Mar 17, 2021 · 2 comments

Comments

@libertysoft3
Copy link
Owner

libertysoft3 commented Mar 17, 2021

Part of Reddit's sitewide banning code is in place with user._spam! saidit introduced the redundant user attribute user.is_global_banned and cassandra db table. Refactor saidit's global bans to set user._spam on global ban instead. Remove all references to is_global_banned.

Likely will be a decent performance booster by omitting these users from the re-indexing of listings process/query results.

See related suggestion #93

@libertysoft3 libertysoft3 changed the title Refactor global bans Admin: refactor global/site bans Aug 28, 2021
@CrystalVulpine
Copy link
Contributor

All of it is in place, except the frontend which is probably a separate program anyway. _spam does shadowbans on an account. in_timeout suspends them. It is fully functional, at least in the original reddit repository. I made an issue about this.

@CrystalVulpine
Copy link
Contributor

You also can't remove global bans entirely, because doing so would unban everyone who is under one. saidit.net itself could run a script to switch them all over to in_timeout beforehand, but by removing it we would still be breaking other instances of saidit. Unless there's a converter built into saidit itself, but then it has to run every time saidit is started, and global bans still have be partially left in place so they can be detected in the first place.

Also, _spam is a shadowban, not a regular ban like global bans. You probably want in_timeout, which is a reddit suspension. Don't use _banned, that's the one that changes the user's password so they can't log into their account at all, which reddit famously first used on u/ChuckSpears. I have no idea why the variables are named the way they are.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants