Filter private info from public shares

This commit is contained in:
Tom Moor
2018-05-23 23:59:00 -07:00
parent 7eea1a90af
commit e538df0df3
8 changed files with 42 additions and 39 deletions

View File

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

View File

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