I already have a solid back-end permissions authorization (ie. admin can perform an action, a normal user cannot perform an action). However, I'm wondering if there is a better way to do a frontend authorization for my single page JavaScript application then fetching a permission from the API every view.
Seems like I could:
a. Have a global way to tell what kind of user it is?
- I could do this but if permissions change in the backend I'd have to update who can view what on the front end.
b. Check permissions on every view?
- Just seems like a lot of API requests
c. Create a separate app for a Dashboard?
- That way I could know all the user's current permissions without a normal user getting back there looking around.
I may have answered my question with c but if anyone thinks of a better idea I'd like to hear it.