|
@@ -57,15 +57,15 @@ class Comment extends React.Component {
|
|
|
this.renderHtml(nextProps.comment.comment);
|
|
this.renderHtml(nextProps.comment.comment);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- checkPermissionToControlComment() {
|
|
|
|
|
- return this.props.appContainer.isAdmin || this.isCurrentUserEqualsToAuthor();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// not used
|
|
// not used
|
|
|
setMarkdown(markdown) {
|
|
setMarkdown(markdown) {
|
|
|
this.renderHtml(markdown);
|
|
this.renderHtml(markdown);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ checkPermissionToControlComment() {
|
|
|
|
|
+ return this.props.appContainer.isAdmin || this.isCurrentUserEqualsToAuthor();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
isCurrentUserEqualsToAuthor() {
|
|
isCurrentUserEqualsToAuthor() {
|
|
|
return this.props.comment.creator.username === this.props.appContainer.me;
|
|
return this.props.comment.creator.username === this.props.appContainer.me;
|
|
|
}
|
|
}
|