I m developing the application based on roles using angular 4 and spring boot web services.As I am having two user i.e super admin and client admin. Super admin creating client admin and giving some permissions to him for accessing the application as well as super admin is setting one payment options for this client admin. So for setting this payment options I am thinking to use Local storage for storing this variable value but as I am log out as Super admin and trying to logged in as client admin, this local storage gets refreshed I lost my variable. I am not getting way to do this variable passing from one user to another. Can anyone please clear my doubts?
I am not able to understand why you are setting the payment option for one particular client admin in browser local storage?
browser local storage should be used to maintain the user session through the state of an application.
if you want to set payment option for ay client admin created by super admin I think you should use API call to the server to store this option in the database and everytime client admin log's in check if payment option is available or no.
I think this would be easier to maintain user roles and their permission across all browser.