Skip to content

Commit

Permalink
add AssignResourceRole method
Browse files Browse the repository at this point in the history
  • Loading branch information
RazcoDev committed Apr 3, 2024
1 parent d2725ef commit a7c7af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (u *Users) Delete(ctx context.Context, userKey string) error {

// AssignRole assigns a role to a user in your context's environment, by user key, role key and tenant key.
// Usage Example:
// `roleAssignment, err := PermitClient.Api.Users.AssignRole(ctx, "user-key", "role-key", "default", "document:mydoc")`
// `roleAssignment, err := PermitClient.Api.Users.AssignRole(ctx, "user-key", "role-key", "default")`
func (u *Users) AssignRole(ctx context.Context, userKey string, roleKey string, tenantKey string) (*models.RoleAssignmentRead, error) {
err := u.lazyLoadPermitContext(ctx)
if err != nil {
Expand Down

0 comments on commit a7c7af4

Please sign in to comment.