Archive manual users on remove
Switch remove-user behavior for manually managed profiles from hard\ndelete to archival by deactivating the profile. This matches the\nrequested SCIM-like lifecycle while avoiding dependency errors for\nlinked records such as signatures and assets.\n\nThe remove flow now updates profile state to INACTIVE, updates\nmembership timestamps, and emits a user-updated webhook event instead of\ndelete events. E2E coverage now asserts that remove keeps the profile\nand marks it inactive. Signed-off-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
committed by
Bryan Frimin
parent
ffa3db3cd2
commit
b50bbc8d6a
@@ -2930,10 +2930,6 @@ func (r *Resolver) RemoveUserTool(ctx context.Context, req *mcp.CallToolRequest,
|
||||
return nil, types.RemoveUserOutput{}, fmt.Errorf("cannot remove last active owner: %w", err)
|
||||
}
|
||||
|
||||
if _, ok := errors.AsType[*iam.ErrUserReferencedByRecords](err); ok {
|
||||
return nil, types.RemoveUserOutput{}, fmt.Errorf("cannot remove user: %w", err)
|
||||
}
|
||||
|
||||
if errors.Is(err, coredata.ErrResourceInUse) {
|
||||
return nil, types.RemoveUserOutput{}, fmt.Errorf("cannot remove user: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user