diff --git a/apps/documenteditor/mobile/src/store/appOptions.js b/apps/documenteditor/mobile/src/store/appOptions.js index 9a4bddfcf..29fba4077 100644 --- a/apps/documenteditor/mobile/src/store/appOptions.js +++ b/apps/documenteditor/mobile/src/store/appOptions.js @@ -114,8 +114,13 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly; + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canEditStyles = this.canLicense && this.canEdit; this.canPrint = (permissions.print !== false); diff --git a/apps/presentationeditor/mobile/src/store/appOptions.js b/apps/presentationeditor/mobile/src/store/appOptions.js index 8bcca3785..71f5563de 100644 --- a/apps/presentationeditor/mobile/src/store/appOptions.js +++ b/apps/presentationeditor/mobile/src/store/appOptions.js @@ -94,8 +94,13 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly; + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canEditStyles = this.canLicense && this.canEdit; this.canPrint = (permissions.print !== false); diff --git a/apps/spreadsheeteditor/mobile/src/store/appOptions.js b/apps/spreadsheeteditor/mobile/src/store/appOptions.js index 0ab2a34c9..061c4cb8b 100644 --- a/apps/spreadsheeteditor/mobile/src/store/appOptions.js +++ b/apps/spreadsheeteditor/mobile/src/store/appOptions.js @@ -94,8 +94,13 @@ export class storeAppOptions { this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); this.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); - this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly; + this.canEditComments = this.isOffline || !permissions.editCommentAuthorOnly; this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly; + if ((typeof (this.customization) == 'object') && this.customization.commentAuthorOnly===true) { + console.log("Obsolete: The 'commentAuthorOnly' parameter of the 'customization' section is deprecated. Please use 'editCommentAuthorOnly' and 'deleteCommentAuthorOnly' parameters in the permissions instead."); + if (permissions.editCommentAuthorOnly===undefined && permissions.deleteCommentAuthorOnly===undefined) + this.canEditComments = this.canDeleteComments = this.isOffline; + } this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false); this.canPrint = (permissions.print !== false); this.isRestrictedEdit = !this.isEdit && this.canComments && isSupportEditFeature;