Trust center access management - get rid of access token

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-15 16:16:06 +04:00
committed by Bryan Frimin
parent 8b3bda56e6
commit 44d85a2b12
39 changed files with 582 additions and 1800 deletions

View File

@@ -23,10 +23,16 @@ import (
type ctxKey struct{ name string }
var (
compliancePageKey = &ctxKey{name: "compliance_page"}
compliancePageKey = &ctxKey{name: "compliance_page"}
complianceMembershipKey = &ctxKey{name: "compliance_membership"}
)
func CompliancePageFromContext(ctx context.Context) *coredata.TrustCenter {
trustCenter, _ := ctx.Value(compliancePageKey).(*coredata.TrustCenter)
return trustCenter
}
func ComplianceMembershipFromContext(ctx context.Context) *coredata.TrustCenterAccess {
membership, _ := ctx.Value(complianceMembershipKey).(*coredata.TrustCenterAccess)
return membership
}