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
Currently, when checking that a user is permitted to do certain privileged operations (i.e. running the scraper), we just check if the user's CAS NetID is equal to my NetID (ekb33). We should add a boolean admin column to the users table that would allow users to be set as administrators, and then check if the current user is an admin when attempting to perform privileged operations, rather than checking against my hardcoded NetID. If you really want to be fancy, you could try to figure out how to add a decorator for this (like @admin_required, comparably to how flask-cas and flask-login implement @login_required).
For banned, it would be good to be able to ban individual users who we don't want using the site. Just in case.
The text was updated successfully, but these errors were encountered:
Currently, when checking that a user is permitted to do certain privileged operations (i.e. running the scraper), we just check if the user's CAS NetID is equal to my NetID (
ekb33
). We should add a booleanadmin
column to theusers
table that would allow users to be set as administrators, and then check if the current user is anadmin
when attempting to perform privileged operations, rather than checking against my hardcoded NetID. If you really want to be fancy, you could try to figure out how to add a decorator for this (like@admin_required
, comparably to howflask-cas
andflask-login
implement@login_required
).For
banned
, it would be good to be able to ban individual users who we don't want using the site. Just in case.The text was updated successfully, but these errors were encountered: