policies implemented

This commit is contained in:
adlerhurst
2020-11-06 22:09:19 +01:00
parent f7f810caa5
commit 57fc3ddd16
22 changed files with 667 additions and 87 deletions
+4 -2
View File
@@ -5,6 +5,7 @@ import (
"time"
"github.com/caos/zitadel/internal/api/authz"
"github.com/caos/zitadel/internal/api/service"
"github.com/caos/zitadel/internal/eventstore/v2/repository"
)
@@ -77,10 +78,11 @@ func BaseEventFromRepo(event *repository.Event) *BaseEvent {
}
}
func NewBaseEventForPush(ctx context.Context, service string, typ EventType) *BaseEvent {
func NewBaseEventForPush(ctx context.Context, typ EventType) *BaseEvent {
svcName := service.FromContext(ctx)
return &BaseEvent{
User: authz.GetCtxData(ctx).UserID,
Service: service,
Service: svcName,
EventType: typ,
}
}