Store full portal titles as home headings

The UI composed "Compliance at {{name}}." via i18n while the
DB only held the org name. Persist the full heading, backfill
existing rows, and drop the unused heroTitle locale keys.

Also use clientip.Extract for NDA signing events and default
the portal base domain to probopage.localhost for local runs.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-21 15:39:28 +02:00
parent a3d6c120d7
commit 63dffe801e
20 changed files with 31 additions and 27 deletions

View File

@@ -7,13 +7,13 @@ package complianceportal_v1
import (
"context"
"net"
"time"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/coredata"
"go.probo.inc/probo/pkg/esign"
"go.probo.inc/probo/pkg/server/api/authn"
"go.probo.inc/probo/pkg/server/api/clientip"
"go.probo.inc/probo/pkg/server/api/complianceportal"
"go.probo.inc/probo/pkg/server/api/complianceportal/v1/schema"
"go.probo.inc/probo/pkg/server/api/complianceportal/v1/types"
@@ -28,10 +28,7 @@ func (r *mutationResolver) AcceptElectronicSignature(ctx context.Context, input
compliancePortal = complianceportal.CompliancePortalFromContext(ctx)
)
signerIP, _, _ := net.SplitHostPort(httpReq.RemoteAddr)
if signerIP == "" {
signerIP = httpReq.RemoteAddr
}
signerIP := clientip.Extract(httpReq)
scope := coredata.NewScopeFromObjectID(compliancePortal.ID)
@@ -64,10 +61,7 @@ func (r *mutationResolver) RecordSigningEvent(ctx context.Context, input types.R
compliancePortal = complianceportal.CompliancePortalFromContext(ctx)
)
actorIP, _, _ := net.SplitHostPort(httpReq.RemoteAddr)
if actorIP == "" {
actorIP = httpReq.RemoteAddr
}
actorIP := clientip.Extract(httpReq)
scope := coredata.NewScopeFromObjectID(compliancePortal.ID)