Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Revoking a user permission #7605


User avatar
0
PhilWynn created

Hi,

I am able to add a permission to a user using method UserManager.GrantPermissionAsync

However, I cannot see a way to remove a permission from a user. Can you advise please?

Regards


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You can use the ProhibitPermissionAsync method of the UserManager.

    In fact, the UserManager's SetGrantedPermissionsAsync method will automatically grant/revoke permissions based on the permissions parameter.