Add User Management Commands
Have user management commands & user management properly working to be able to ban users at the least.
This would also require properly handling user roles, and figuring out the best way to be able to setup admins/moderators.
Probably only allow one admin? And just have it so there's an api to set them up first, then don't allow any more. And then the admin can assign moderators.
Admin user is now implemented. If you register a user with the name "admin", they will become an admin user. As usernames are unique this will work. Just register them as the first user before making it public, and then you can promote some mods. Right now admins and mods can perform the same actions, with the exception of mods being unable to demote admins.
The current commands are:
Ban: which removes a user from the database. I realized that I don't need uuid's as the username cannot change after they've been removed.
Kick: which invalidates the users current token, forcing them to re-login. I want to implement a timeout system, not allowing them to logout for a certain amount of time, but right now I don't know how I'd do that.
Demote: Demotes a moderator into a normal user.
Premote: Premotes a normal user into a moderator.
As of right now commands are only available via a js script, as the frontend for commands is not finished yet.
@luna you should probably also add a way for a checking the message list, after you've implemented commands :3
Deleting a branch is permanent. It CANNOT be undone. Continue?