From 8bcd9da3982f22789db2e18ee6e8758c45d6d536 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 12 Jul 2019 10:43:02 +0300 Subject: [PATCH] Refactoring update users rights --- apps/api/documents/api.js | 8 ++------ apps/common/main/lib/view/ReviewPopover.js | 2 +- apps/documenteditor/main/app/view/FileMenuPanels.js | 2 +- apps/presentationeditor/main/app/view/FileMenuPanels.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 8d8dfbbec..e88648d64 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -541,9 +541,7 @@ var _setUsers = function(data) { _sendCommand({ command: 'setUsers', - data: { - data: data - } + data: data }); }; @@ -557,9 +555,7 @@ var _setSharingSettings = function(data) { _sendCommand({ command: 'setSharingSettings', - data: { - data: data - } + data: data }); }; diff --git a/apps/common/main/lib/view/ReviewPopover.js b/apps/common/main/lib/view/ReviewPopover.js index 4f076ae48..99c696079 100644 --- a/apps/common/main/lib/view/ReviewPopover.js +++ b/apps/common/main/lib/view/ReviewPopover.js @@ -972,7 +972,7 @@ define([ }, setUsers: function(data) { - this.externalUsers = data.data || []; + this.externalUsers = data.users || []; this.isUsersLoading = false; this._state.emailSearch && this.onEmailListMenu(this._state.emailSearch.str, this._state.emailSearch.left, this._state.emailSearch.right); this._state.emailSearch = null; diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 2cae0016c..a766cd941 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1010,7 +1010,7 @@ define([ }, setSharingSettings: function(data) { - data && data.data && this.updateSharingSettings(data.data); + data && this.updateSharingSettings(data.sharingSettings); }, updateSharingSettings: function(rights) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index cec2bd672..e338e1cb2 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -823,7 +823,7 @@ define([ }, setSharingSettings: function(data) { - data && data.data && this.updateSharingSettings(data.data); + data && this.updateSharingSettings(data.sharingSettings); }, updateSharingSettings: function(rights) { diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index fe226c362..4958846b2 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1277,7 +1277,7 @@ define([ }, setSharingSettings: function(data) { - data && data.data && this.updateSharingSettings(data.data); + data && this.updateSharingSettings(data.sharingSettings); }, updateSharingSettings: function(rights) {