You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have users and admins. We'll probably need more detailed levels of authorization to enable some of the other features.
Description
Currently, just having user/admin is fine, but to implement things like #62 and (potentially) giving donors more access than normal users we'll need to implement multiple layers, rather than just a boolean restricted/not.
I think at least four layers will be necessary:
User
Donator
Mod
Admin
What, exactly, each of these users can do is up for discussion, hence the tag.
Also worth noting is that any "greater" level can do everything that the lower levels can do, so a mod can implicitly do everything a donator can, whether or not they've actually donated.
CREATE TYPE permission AS ENUM ('user', 'donator', 'mod', 'admin');
The order is important -- in PostgreSQL, values later in the list compare as > than values earlier in the list. As a trivial example, getting all people with donator privileges or above is just SELECT * FROM users WHERE permissions >= 'donator'.
The text was updated successfully, but these errors were encountered:
BLOCKED until #18 is done
Goal
We currently have users and admins. We'll probably need more detailed levels of authorization to enable some of the other features.
Description
Currently, just having user/admin is fine, but to implement things like #62 and (potentially) giving donors more access than normal users we'll need to implement multiple layers, rather than just a boolean restricted/not.
I think at least four layers will be necessary:
What, exactly, each of these users can do is up for discussion, hence the tag.
Also worth noting is that any "greater" level can do everything that the lower levels can do, so a mod can implicitly do everything a donator can, whether or not they've actually donated.
Additional notes
This can probably done with:
The order is important -- in PostgreSQL, values later in the list compare as
>
than values earlier in the list. As a trivial example, getting all people with donator privileges or above is justSELECT * FROM users WHERE permissions >= 'donator'
.The text was updated successfully, but these errors were encountered: