mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Allow admins access to comment delete
This commit is contained in:
parent
242f01118b
commit
7b514344fa
2 changed files with 4 additions and 1 deletions
|
@ -45,6 +45,7 @@ const PreviewPresentation = ({
|
|||
assetHost,
|
||||
backpackOptions,
|
||||
canAddToStudio,
|
||||
canDeleteComments,
|
||||
canReport,
|
||||
canRestoreComments,
|
||||
comments,
|
||||
|
@ -364,7 +365,7 @@ const PreviewPresentation = ({
|
|||
{comments.map(comment => (
|
||||
<TopLevelComment
|
||||
author={comment.author}
|
||||
canDelete={userOwnsProject}
|
||||
canDelete={canDeleteComments}
|
||||
canReply={isLoggedIn && projectInfo.comments_allowed}
|
||||
canRestore={canRestoreComments}
|
||||
content={comment.content}
|
||||
|
@ -412,6 +413,7 @@ PreviewPresentation.propTypes = {
|
|||
visible: PropTypes.bool
|
||||
}),
|
||||
canAddToStudio: PropTypes.bool,
|
||||
canDeleteComments: PropTypes.bool,
|
||||
canReport: PropTypes.bool,
|
||||
canRestoreComments: PropTypes.bool,
|
||||
comments: PropTypes.arrayOf(PropTypes.object),
|
||||
|
|
|
@ -350,6 +350,7 @@ class Preview extends React.Component {
|
|||
assetHost={this.props.assetHost}
|
||||
backpackOptions={this.props.backpackOptions}
|
||||
canAddToStudio={this.props.canAddToStudio}
|
||||
canDeleteComments={this.props.isAdmin || this.props.userOwnsProject}
|
||||
canReport={this.props.canReport}
|
||||
canRestoreComments={this.props.isAdmin}
|
||||
comments={this.props.comments}
|
||||
|
|
Loading…
Reference in a new issue