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

Admins & mods #147

Open
mattrltrent opened this issue Aug 6, 2023 · 0 comments · May be fixed by #149
Open

Admins & mods #147

mattrltrent opened this issue Aug 6, 2023 · 0 comments · May be fixed by #149
Labels
feature Something new!

Comments

@mattrltrent
Copy link
Member

mattrltrent commented Aug 6, 2023

Currently there is a file called firebase_auth.go (I think?) in /middleware. This file should be improved to act as a gatekeeper to different routes, or (maybe?) different permissions per handler. Currently, it gatekeepers admin and any other non-admin role between routes they're allowed in and not. mod and mod<some sort of school specific identifier> roles should also be added, alongside ways for admins to adjust and remove mod roles. This will be done by altering a Firebase user's authentication token and adding a custom payload. An example, again, for how to alter custom data is in firebase_auth.go.

I'm not super sure how this should be implemented, so I think it would be best to first watch some videos or view other content to learn how a good admin-mod-specific_school_mod-general_user role-based authorization system can be implemented.

@mattrltrent mattrltrent added the feature Something new! label Aug 6, 2023
@TalentedB TalentedB linked a pull request Aug 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants