You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you need to update user identity during the same logged in session (eg: change user role from ROLE_PREMIUM_USER back to ROLE_USER). Symfony natively does not support it. You have to logout user and let him log again, which is not very user friendly.
In discussion at symfony/symfony#12025 some users suggest to update user token with new roles, but that is not very easy thing to do via msgphp-user-bundle as UserIdentity is final and cannot be extended with whatever logic developer would like to use.
What would be preferred way to handle such use cases?
ATM Im using permission system rather than roles which is kind of depressing because for things like that should user roles be used... What do you think?
The text was updated successfully, but these errors were encountered:
I have reread Kobzol suggestion again and yes it seems to be a solution where you can leave UserIdentity intact. I will reopen if anything arise. Thanks for such prompt answer.
Sometimes you need to update user identity during the same logged in session (eg: change user role from ROLE_PREMIUM_USER back to ROLE_USER). Symfony natively does not support it. You have to logout user and let him log again, which is not very user friendly.
In discussion at symfony/symfony#12025 some users suggest to update user token with new roles, but that is not very easy thing to do via msgphp-user-bundle as UserIdentity is final and cannot be extended with whatever logic developer would like to use.
What would be preferred way to handle such use cases?
ATM Im using permission system rather than roles which is kind of depressing because for things like that should user roles be used... What do you think?
The text was updated successfully, but these errors were encountered: