Base solution for your next web application
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

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

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.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)