TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
62 stars 29 forks source link

Rework the interface for user role management to allow temporary roles #1701

Closed moozooh closed 3 months ago

moozooh commented 11 months ago

Right now all roles can only be removed manually, and the current interface is not very conducive to implementation of temporary roles in general.

The immediate issue that stems from this is the inability to make temporary bans. Every such thing needs to be managed manually, by putting dates on the calendar and all that. Not ideal, and prone to human factors.

The change I propose is the interface to optionally set a time limit (in days, or by entering a specific date/time) to a role upon which it is removed automatically. This time limit, if set, would count down and be visible to moderators, senior staff, and the user in question on their profile.

The underlying logic could be useful as a stepping stone for implementing potential future features like probation, various notifications (e.g. informing the staff that such-and-such has been unbanned), possible safety-related features, etc.

adelikat commented 11 months ago

I don't think you need any of this at all.

I think the root of the problem is bans are done as a removal of a role, which led to another workaround of having a ban role with no perms.

Simpler would be to detach banning from roles and have some kind of ban flag. It can be a date to make it temporary, that would prevent login regardless of role

moozooh commented 11 months ago

I don't know if turning it into a flag will make it conceptually simpler than a role, but... sure, I suppose? Either way there needs to be an interface for this with some sort of a countdown timer.

adelikat commented 5 months ago

This is related to #1543

I think for both, we need a flag and/or expiry date. We need to know that someone was banned, that they simply lack roles

adelikat commented 3 months ago

The crux of this issue was the ability to do temporary bans which can now be done, closing this issue