fix: Share popover incorrectly displays draft as publicly shared when parent document is (#2982)
closes #2978
This commit is contained in:
@@ -46,7 +46,9 @@ function SharePopover({
|
||||
!document.isTemplate &&
|
||||
auth.team?.sharing &&
|
||||
documentAbilities.share;
|
||||
const isPubliclyShared = (share && share.published) || sharedParent;
|
||||
const isPubliclyShared =
|
||||
(share && share.published) ||
|
||||
(sharedParent && sharedParent.published && !document.isDraft);
|
||||
|
||||
useKeyDown("Escape", onRequestClose);
|
||||
|
||||
@@ -117,7 +119,7 @@ function SharePopover({
|
||||
{t("Share this document")}
|
||||
</Heading>
|
||||
|
||||
{sharedParent && (
|
||||
{sharedParent && !document.isDraft && (
|
||||
<Notice>
|
||||
<Trans
|
||||
defaults="This document is shared because the parent <em>{{ documentTitle }}</em> is publicly shared"
|
||||
|
||||
Reference in New Issue
Block a user