Trust center access management - get rid of access token
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user