Filter private info from public shares
This commit is contained in:
@@ -234,6 +234,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
const document = this.document;
|
||||
const titleFromState = location.state ? location.state.title : '';
|
||||
const titleText = document ? document.title : titleFromState;
|
||||
const isShare = match.params.shareId;
|
||||
|
||||
if (this.notFound) {
|
||||
return <Search notFound />;
|
||||
@@ -273,19 +274,20 @@ class DocumentScene extends React.Component<Props> {
|
||||
readOnly={!this.isEditing}
|
||||
/>
|
||||
</MaxWidth>
|
||||
{document && (
|
||||
<Actions
|
||||
document={document}
|
||||
isDraft={!document.publishedAt}
|
||||
isEditing={this.isEditing}
|
||||
isSaving={this.isSaving}
|
||||
isPublishing={this.isPublishing}
|
||||
savingIsDisabled={!document.allowSave}
|
||||
history={this.props.history}
|
||||
onDiscard={this.onDiscard}
|
||||
onSave={this.onSave}
|
||||
/>
|
||||
)}
|
||||
{document &&
|
||||
!isShare && (
|
||||
<Actions
|
||||
document={document}
|
||||
isDraft={!document.publishedAt}
|
||||
isEditing={this.isEditing}
|
||||
isSaving={this.isSaving}
|
||||
isPublishing={this.isPublishing}
|
||||
savingIsDisabled={!document.allowSave}
|
||||
history={this.props.history}
|
||||
onDiscard={this.onDiscard}
|
||||
onSave={this.onSave}
|
||||
/>
|
||||
)}
|
||||
</Flex>
|
||||
)}
|
||||
</Container>
|
||||
|
||||
@@ -34,7 +34,7 @@ class DocumentShare extends React.Component<Props> {
|
||||
<HelpText>
|
||||
The link below allows anyone to access a read-only version of the
|
||||
document <strong>{document.title}</strong>. You can revoke this link
|
||||
at any point in the future.
|
||||
in settings at any time.
|
||||
</HelpText>
|
||||
<Input
|
||||
type="text"
|
||||
|
||||
Reference in New Issue
Block a user