mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-16 21:08:00 +00:00
16 lines
426 B
Go
16 lines
426 B
Go
|
package handlers
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/api/authz"
|
||
|
"github.com/zitadel/zitadel/internal/eventstore"
|
||
|
)
|
||
|
|
||
|
const NotifyUserID = "NOTIFICATION" //TODO: system?
|
||
|
|
||
|
func HandlerContext(event eventstore.Aggregate) context.Context {
|
||
|
ctx := authz.WithInstanceID(context.Background(), event.InstanceID)
|
||
|
return authz.SetCtxData(ctx, authz.CtxData{UserID: NotifyUserID, OrgID: event.ResourceOwner})
|
||
|
}
|