I have jz completed a little hack to my own angular application. Firstly, i have a list of menu navigation with PUBLIC, MEMBER, ADMIN access roles. Upon login, i stored roles 'MEMBER' to user where he could view PUBLIC and MEMBER links. (using Chrome) But later i turn on
Developer Tools > Application > Storage > Session Storage
manipulate the 'role' variable from 'MEMBER' to 'ADMIN' and i can view the secret admin links.
It's not a coding structure question but rather 'how to store session variable in secured ways'. Before that, i thought PHP's session variable is equivalent to 'Session Storage', which the community says SESSION is not change-able by user https://stackoverflow.com/a/6912409/8163746.
Then now i learnt that, there are two types of SESSIONs, server and client side session. For a standard angular app, what is the best way to store 'email', 'role' kinda deal and yet can't be modify by user? Reason i need them in session is they can be easily call out to
Role - Show/Hide navigation menu items
Email - to perform SQL filter, SELECT fields FROM Record WHERE email=Session.Email
Thanks for the advice.