Fix compliance page to only show published document versions

The compliance page was leaking draft document content and titles.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-02-23 19:11:49 +01:00
parent 24ad1d3e13
commit 9e788ee558
9 changed files with 143 additions and 77 deletions

View File

@@ -70,12 +70,7 @@ func (s *DocumentService) ListForOrganizationId(
ctx,
func(conn pg.Conn) error {
filter := coredata.NewDocumentTrustCenterFilter()
err := documents.LoadByOrganizationID(ctx, conn, s.svc.scope, organizationID, cursor, filter)
if err != nil {
return fmt.Errorf("cannot load documents: %w", err)
}
return nil
return documents.LoadPublishedByOrganizationID(ctx, conn, s.svc.scope, organizationID, cursor, filter)
},
)