S
S
SkeW22019-01-16 16:50:16
ASP.NET
SkeW2, 2019-01-16 16:50:16

How to relogin an account or update cookies when granting a role or deleting a user?

Good afternoon. I am implementing a small project where it is necessary to apply roles that an administrator can assign and remove. I use the standard implementation of IdentityUser, which is created by default. Giving/taking rights/role is not a problem, but here is how to update the user's session from the server side so that inaccessible items are displayed for him and so that it is without the user manually re-entering the site. That is, an ordinary user became an administrator, immediately updated the page and saw several new menu items that were not previously available to him. Or, on the contrary, take it away, but now it turns out that I take away administrator rights from the user or delete it altogether, and until he manually logs out of the account and logs in, he can still perform all administrator functions.
Thank you very much.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question