fix(handler): pass context to statement execution method

This commit is contained in:
adlerhurst
2025-07-25 18:06:19 +02:00
parent c46fd01947
commit 8e8a024500
18 changed files with 106 additions and 107 deletions

View File

@@ -9,8 +9,8 @@ import (
const ExecutionUserID = "EXECUTION"
func HandlerContext(event *eventstore.Aggregate) context.Context {
ctx := authz.WithInstanceID(context.Background(), event.InstanceID)
func HandlerContext(parent context.Context, event *eventstore.Aggregate) context.Context {
ctx := authz.WithInstanceID(parent, event.InstanceID)
return authz.SetCtxData(ctx, authz.CtxData{UserID: ExecutionUserID, OrgID: event.ResourceOwner})
}