How to refresh user role without sign out ?

0
Hi everyone,  I have user that has user that has user role for example called Role1  I am adding another user role to him for example called Role2  So now the effect of Role2 not work until i am sign out and sign in again  Is there any solution to do this without sign out ?
asked
1 answers
1

You don't need necessarily to logout, a hard reload of the page should be sufficient.

You could trigger (via a Javascript action behind a nanoflow for example) the location.reload() function.

Downsides (unavoidable):

  • It discards the current content of the page, which can result in loss of user input or data.
  • It may cause a flickering effect as the page reloads, which can impact user experience.

A completely alternative solution would be to not use the UserRoles, but your own custom visibility & access control, but in general I wouldn't recommend this.

Good luck!

answered