From bbb3a24286d99be8e1d9091c0e9705e50345c4c4 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Mon, 6 Jul 2026 18:48:09 +0200 Subject: [PATCH] Exclude unpublished docs from available accesses The available document access list backing Grant All included documents whose trust center visibility is PRIVATE but that have no published version. Require a published major so the grantable set matches the request-all filter and the Slack notification, which already skip drafts and hidden documents. Signed-off-by: Sacha Al Himdani --- pkg/coredata/trust_center_document_access.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/coredata/trust_center_document_access.go b/pkg/coredata/trust_center_document_access.go index 54676adb5..1402b3db8 100644 --- a/pkg/coredata/trust_center_document_access.go +++ b/pkg/coredata/trust_center_document_access.go @@ -504,6 +504,7 @@ all_items AS ( WHERE d.organization_id = o.organization_id AND d.deleted_at IS NULL AND d.trust_center_visibility = 'PRIVATE'::trust_center_visibility + AND d.current_published_major IS NOT NULL UNION ALL