Unverified Commit 47b7e646 authored by Benjamin Wheeler's avatar Benjamin Wheeler Committed by GitHub

Merge pull request #2274 from benjiwheeler/hide-share-banner

make share banner appear only if user has the power to share this project
parents e190e036 7aae4219
......@@ -48,6 +48,7 @@ const PreviewPresentation = ({
canDeleteComments,
canReport,
canRestoreComments,
canShare,
cloudHost,
comments,
editable,
......@@ -94,7 +95,7 @@ const PreviewPresentation = ({
const shareDate = ((projectInfo.history && projectInfo.history.shared)) ? projectInfo.history.shared : '';
return (
<div className="preview">
{!isShared && (
{canShare && !isShared && (
<ShareBanner onShare={onShare} />
)}
{ projectInfo && projectInfo.author && projectInfo.author.id && (
......@@ -440,6 +441,7 @@ PreviewPresentation.propTypes = {
canDeleteComments: PropTypes.bool,
canReport: PropTypes.bool,
canRestoreComments: PropTypes.bool,
canShare: PropTypes.bool,
cloudHost: PropTypes.string,
comments: PropTypes.arrayOf(PropTypes.object),
editable: PropTypes.bool,
......
......@@ -405,6 +405,7 @@ class Preview extends React.Component {
canDeleteComments={this.props.isAdmin || this.props.userOwnsProject}
canReport={this.props.canReport}
canRestoreComments={this.props.isAdmin}
canShare={this.props.canShare}
cloudHost={this.props.cloudHost}
comments={this.props.comments}
editable={this.props.isEditable}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment