diff --git a/apps/common/mobile/lib/controller/collaboration/Comments.jsx b/apps/common/mobile/lib/controller/collaboration/Comments.jsx index 09501790c..b90261b85 100644 --- a/apps/common/mobile/lib/controller/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/controller/collaboration/Comments.jsx @@ -139,9 +139,9 @@ class CommentsController extends Component { changeComment.quote = data.asc_getQuoteText(); changeComment.time = date.getTime(); changeComment.date = dateToLocaleTimeString(date); - changeComment.editable = (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getUserName()); - changeComment.removable = (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()); - changeComment.hide = !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()); + changeComment.editable = (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(name); + changeComment.removable = (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(name); + changeComment.hide = !AscCommon.UserInfoParser.canViewComment(name); let dateReply = null; const replies = []; @@ -165,8 +165,8 @@ class CommentsController extends Component { reply: data.asc_getReply(i).asc_getText(), time: dateReply.getTime(), userInitials: this.usersStore.getInitials(parsedName), - editable: (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getReply(i).asc_getUserName()), - removable: (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getReply(i).asc_getUserName()) + editable: (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName), + removable: (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName) }); } changeComment.replies = replies; @@ -198,9 +198,9 @@ class CommentsController extends Component { replies : [], groupName : (groupName && groupName.length>1) ? groupName[1] : null, userInitials : this.usersStore.getInitials(parsedName), - editable : (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getUserName()), - removable : (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()), - hide : !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()), + editable : (this.appOptions.canEditComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName), + removable : (this.appOptions.canDeleteComments || (data.asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName), + hide : !AscCommon.UserInfoParser.canViewComment(userName), }; if (comment) { const replies = this.readSDKReplies(data); @@ -232,8 +232,8 @@ class CommentsController extends Component { reply : data.asc_getReply(i).asc_getText(), time : date.getTime(), userInitials : this.usersStore.getInitials(parsedName), - editable : (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(data.asc_getReply(i).asc_getUserName()), - removable : (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getReply(i).asc_getUserName()) + editable : (this.appOptions.canEditComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canEditComment(userName), + removable : (this.appOptions.canDeleteComments || (data.asc_getReply(i).asc_getUserId() === this.curUserId)) && AscCommon.UserInfoParser.canDeleteComment(userName) }); } } diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index cde91a273..eefe2aa6a 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -670,7 +670,7 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes {!viewMode &&