@@ -18,7 +18,6 @@ import (
|
||||
"context"
|
||||
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -46,15 +45,6 @@ func IdentityFromContext(ctx context.Context) *coredata.Identity {
|
||||
return identity
|
||||
}
|
||||
|
||||
func IdentityIDFromContext(ctx context.Context) *gid.GID {
|
||||
identity := IdentityFromContext(ctx)
|
||||
if identity == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &identity.ID
|
||||
}
|
||||
|
||||
func ContextWithIdentity(ctx context.Context, identity *coredata.Identity) context.Context {
|
||||
return context.WithValue(ctx, identityContextKey, identity)
|
||||
}
|
||||
|
||||
@@ -945,7 +945,7 @@ func (r *mutationResolver) RecordAccessReviewEntryDecision(ctx context.Context,
|
||||
EntryID: input.AccessReviewEntryID,
|
||||
Decision: input.Decision,
|
||||
DecisionNote: input.DecisionNote,
|
||||
DecidedByID: authn.IdentityIDFromContext(ctx),
|
||||
DecidedByID: &authn.IdentityFromContext(ctx).ID,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -3529,7 +3529,7 @@ func (r *Resolver) RecordAccessReviewEntryDecisionTool(ctx context.Context, req
|
||||
EntryID: input.AccessReviewEntryID,
|
||||
Decision: input.Decision,
|
||||
DecisionNote: input.DecisionNote,
|
||||
DecidedByID: authn.IdentityIDFromContext(ctx),
|
||||
DecidedByID: &authn.IdentityFromContext(ctx).ID,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user