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 <sacha@probo.com>
This commit is contained in:
Sacha Al Himdani
2026-07-06 18:48:09 +02:00
parent cdd3af635b
commit bbb3a24286

View File

@@ -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