hi
Can you share a minimal project to reproduce?
liming.ma@volosoft.com
Thanks.
ok, I will fix this and share a temporary solution.
Thanks.
Yes. Correct. : )
hi
You should get the user, user roles from UserManager based on the CurrentUser.Id
var user = await _identityUserManager.GetByIdAsync(CurrentUser.GetId());
Then check the user roles to add your logic. For example, you could add or remove a role from the user.
if you want to return a string message. you can get it from user entity instead of CurrentUser.
the user entity has a higher priority than the CurrentUser.
In short, the CurrentUser is used to get the user entity.
hi
You can get roles from user instead of CurrentUser.
The CurrentUser values from HttContext.User.
hi
takes around 5 mins to load the login page
The logs you shared didn't contain the logs of Account/Login page.
Can you share all of theogs.txt by https://wetransfer.com/
Thanks.
hi
but if I return the second line then it return the new roles
Yes. This is the default behavior.
The CurrentUser values from HttContext.User.
You can Changing the Current Principal
https://abp.io/docs/latest/framework/infrastructure/current-user#changing-the-current-principal
hi
You can try to inject the ConfigStateService And call this.configState.refreshAppState();