Merge pull request #2612 from chrisgarrity/hotfix/no-comment-unshared

Disallow comments on unshared projects
This commit is contained in:
Paul Kaplan 2019-01-07 13:10:09 -05:00 committed by GitHub
commit 3ecc7d9a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -520,7 +520,7 @@ const PreviewPresentation = ({
<FlexRow className="comments-root-reply">
{projectInfo.comments_allowed ? (
isLoggedIn ? (
<ComposeComment
isShared && <ComposeComment
projectId={projectId}
onAddComment={onAddComment}
/>
@ -541,7 +541,7 @@ const PreviewPresentation = ({
<TopLevelComment
author={comment.author}
canDelete={canDeleteComments}
canReply={isLoggedIn && projectInfo.comments_allowed}
canReply={isLoggedIn && projectInfo.comments_allowed && isShared}
canReport={isLoggedIn}
canRestore={canRestoreComments}
content={comment.content}