diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 539eaa81b..45dafae27 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -988,11 +988,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({ diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index c3d19f6ce..cc0bada8e 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -801,11 +801,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({ diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 919be95ad..03a50af6e 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1255,11 +1255,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({