Suppose in one application we have interface(UI) to assign roles.
First scenario:
So to say user A
who is normal user
. And one admin assigns him ADMIN
role using UI.
Now when user A
logins the application then he can see all the tabs which can be accessed by ADMIN.
Second scenario:
In the same time (when he is logged in and have session with ADMIN role), admin makes user A as normal USER
who have normal privileges.
But as he is login as ADMIN so he can access all the admin information for all the tabs as in this session he has ADMIN role.
How I can solve this problem??