Hide unpublished and hidden docs in Slack alert
The trust center access-request Slack notification listed every document referenced by a document access, including drafts with no published version and documents whose trust center visibility is NONE. Skip those so the message only surfaces documents a requester could actually be granted. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -354,6 +354,10 @@ func (s *Service) loadDocumentsReportsAndFilesFromAccesses(
|
||||
return nil, nil, nil, fmt.Errorf("cannot load document: %w", err)
|
||||
}
|
||||
|
||||
if doc.CurrentPublishedMajor == nil || doc.TrustCenterVisibility == coredata.TrustCenterVisibilityNone {
|
||||
continue
|
||||
}
|
||||
|
||||
documents = append(
|
||||
documents,
|
||||
SlackMessageDocument{
|
||||
|
||||
Reference in New Issue
Block a user