Skip to main content
Version: 2.0.0

AssignResourceRole

Assign a resource role to a specific user.

Parameters

ctx - The context of the request.
userKey - The key of the user to assign the role to.
roleKey - The key of the role to assign to the user.
tenantKey - The key of the user's tenant.
resourceInstance - The resource instance to assign the role with (e.g. "document:mydoc") .

Implementation

    resourceRoleAssignment, err := Permit.Api.Users.AssignResourceRole(ctx, "user-key", "role-key", "tenant-key", "document:doc1")