From 270a29be7dbc826bd45c7599abab3c573a2a8e17 Mon Sep 17 00:00:00 2001 From: Razco Date: Wed, 3 Apr 2024 12:28:57 +0300 Subject: [PATCH] add AssignResourceRole method --- pkg/api/users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/users.go b/pkg/api/users.go index 58ce13b..7cb17be 100644 --- a/pkg/api/users.go +++ b/pkg/api/users.go @@ -184,7 +184,7 @@ func (u *Users) AssignRole(ctx context.Context, userKey string, roleKey string, return roleAssignmentRead, nil } -// AssignResourceRole assigns a role to a user in your context's environment, by user key, role key and tenant key. +// AssignResourceRole assigns a *resource* role to a user in your context's environment, by user key, role key, tenant key and a resource instance string (e.g. "document:mydoc"). // Usage Example: // `roleAssignment, err := PermitClient.Api.Users.AssignRole(ctx, "user-key", "role-key", "default", "document:mydoc")` func (u *Users) AssignResourceRole(ctx context.Context, userKey string, roleKey string, tenantKey string, resourceInstance string) (*models.RoleAssignmentRead, error) {