From 42120fe5d47418584962b39a58dae415f33952aa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Apr 2019 17:10:34 +0300 Subject: [PATCH] [DE] Fix Bug 41450 --- apps/common/main/lib/controller/ReviewChanges.js | 4 +++- apps/common/main/lib/model/ReviewChange.js | 2 +- apps/common/main/lib/template/ReviewChangesPopover.template | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index 5a28a862a..ce29e3eb5 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -109,6 +109,7 @@ define([ this.setApi(api); if (data) { + this.currentUserId = data.config.user.id; this.sdkViewName = data['sdkviewname'] || this.sdkViewName; } }, @@ -434,7 +435,8 @@ define([ changedata : item, scope : me.view, hint : !me.appConfig.canReview, - goto : (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom) + goto : (item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveTo || item.get_MoveType() == Asc.c_oAscRevisionsMove.MoveFrom), + editable : (item.get_UserId() == me.currentUserId) }); arr.push(change); diff --git a/apps/common/main/lib/model/ReviewChange.js b/apps/common/main/lib/model/ReviewChange.js index 89d016cad..f31939279 100644 --- a/apps/common/main/lib/model/ReviewChange.js +++ b/apps/common/main/lib/model/ReviewChange.js @@ -63,7 +63,7 @@ define([ type : 0, changedata : null, hint : false, - + editable : false, id : Common.UI.getId(), // internal scope : null } diff --git a/apps/common/main/lib/template/ReviewChangesPopover.template b/apps/common/main/lib/template/ReviewChangesPopover.template index 9b8762816..0f6ed8e70 100644 --- a/apps/common/main/lib/template/ReviewChangesPopover.template +++ b/apps/common/main/lib/template/ReviewChangesPopover.template @@ -10,7 +10,9 @@ <% } %> <% if (!hint) { %> <% if (scope.appConfig.isReviewOnly) { %> -
+ <% if (editable) { %> +
+ <% } %> <% } else { %>