jmix
jmix copied to clipboard
UserIndicator doesn't reload user when refreshing v2.x
Environment
Jmix version: 2.x
Bug Description
If a currently logged in user has been changed, then invoking UserIndicator#refreshUser
has no effect because CurrentUserSubstitution#getAuthenticatedUser
returns old instance.
Steps To Reproduce
- Create two users.
- Set User1 as substitution for User2
- Login as User1.
- Change User1 first name.
- Change user in the user indicator panel.
Current Behavior
User doesn't change and shows old user first name.
Expected Behavior
User indicator should show the actual user info.
Related to #2465