BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec

Activities of "sukhdeep.dhillon"

based on the documentation you shared to change the current principal,

how can I create new Current principal with all the values of the existing principal and change only the role.

could you please give me code example based on the screenshot I shared before

I don't understand I'm changing the role with _IdentityUserManager for dynamic claims then I 'm changing current principal to check the permissions.

is there any other way to check the permission without changing the current principal.

Hi,

isGranted variable doesn't relfect the latest value when role is updated in this method before get to this line,

but in the next call, isGranted has the expected value and working fine.

so when role is changed, the associated permission of the role doesn't reflect in the same call.

thank you for explaining this,

from this, what I understood is that, I should always use _identityUserManager to change any dynamic claim for the current user.

hi,

so far what I have understood is that. if I wanna change the role of the current user (dynamic claim) so I should stick with IdentityUserManager to change the role of the current user, but for other purpose I can use CurrentUser service to read some data about user.

because in my implementation, all I wanna do change the role of the current user based on some conditions.

am I correct ?

lets say If I don't want to change the Current Principal, but the other approach I'm taking to change the role of the user.

is it right approach or is there any better way to solve it.

Hi, I have the following method that I'm using to test the dynamic claims

as you can see I'm changing the role of the current user on the backend.

if I return the first line with CurrentUser.Roles, it still shows old roles, (this means CurrentUser service is not updating with latest data)

but if I return the second line then it return the new roles

  • ABP Framework version: v8.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

As I'm using dynamic claims, on the backend I can see that CurrentUser service is getting updated if I change the role of the current user.

on the frontend, if I call authService.refreshToken() the access token gets updated too.

but, this.config.getOne$('currentUser').subscribe((currentUser) => { } DOES NOT get reflected with the latest role for the current user.

how can I access the dynamic claim changes on the frontend for the currentuser

Hi,

after seeing your screenshot when I tried that endpoint from swagger. its working fine with swagger returning 400 but with postman its still returning 500. not sure, seems like postman issue

Showing 21 to 30 of 97 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.