handle unassignment of role

This commit is contained in:
Mike Mason
2023-07-11 22:26:16 +00:00
parent 11fe8f8f2a
commit 2147f0374b
11 changed files with 403 additions and 162 deletions

View File

@@ -49,8 +49,8 @@ type Service interface {
IsUser(id gidx.PrefixedID) bool
// AssignUser assigns a user to the given resource.
AssignUser(ctx context.Context, userID gidx.PrefixedID, resourceIDs ...gidx.PrefixedID) error
// RemoveUser removes the users from the given resource.
RemoveUser(ctx context.Context, userID gidx.PrefixedID, resourceIDs ...gidx.PrefixedID) error
// UnassignUser removes the users from the given resource.
UnassignUser(ctx context.Context, userID gidx.PrefixedID, resourceIDs ...gidx.PrefixedID) error
// IsAssignableResource checks if the provided resource ID may have assigned users.
IsAssignableResource(id gidx.PrefixedID) bool