Refactor access review campaign source API
Expose campaign sources as first-class nodes, paginate fetch attempts instead of denormalized status fields, and bind entries to their campaign snapshot. Update GraphQL, MCP, CLI, console, and e2e coverage to match. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"context"
|
||||
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -45,6 +46,15 @@ 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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user