Deprecate permission.rename parameter (use onRequestRename event instead)
This commit is contained in:
parent
432bfd5bf1
commit
7f8b271e1b
|
@ -1225,7 +1225,7 @@ define([
|
|||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
|
@ -1286,6 +1286,8 @@ define([
|
|||
|
||||
if (this.permissions.changeHistory !== undefined)
|
||||
console.warn("Obsolete: The changeHistory parameter of the document permission section is deprecated. Please use onRequestRestore event instead.");
|
||||
if (this.permissions.rename !== undefined)
|
||||
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||
},
|
||||
|
||||
applyModeCommonElements: function() {
|
||||
|
|
|
@ -949,7 +949,7 @@ define([
|
|||
this.appOptions.canViewComments = this.appOptions.canComments || !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||
this.appOptions.canForcesave = this.appOptions.isEdit && !this.appOptions.isOffline && (typeof (this.editorConfig.customization) == 'object' && !!this.editorConfig.customization.forcesave);
|
||||
this.appOptions.forcesave = this.appOptions.canForcesave;
|
||||
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
|
||||
|
@ -981,6 +981,9 @@ define([
|
|||
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.isRestrictedEdit);
|
||||
(this.appOptions.isRestrictedEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
|
||||
this.api.asc_LoadDocument();
|
||||
|
||||
if (this.permissions.rename !== undefined)
|
||||
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||
},
|
||||
|
||||
applyModeCommonElements: function() {
|
||||
|
|
|
@ -1011,7 +1011,7 @@ define([
|
|||
this.appOptions.canComments = this.appOptions.canComments && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canViewComments = this.appOptions.canComments || !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canRename = this.editorConfig.canRename && !!this.permissions.rename;
|
||||
this.appOptions.canRename = this.editorConfig.canRename && (this.permissions.rename!==false);
|
||||
this.appOptions.trialMode = params.asc_getLicenseMode();
|
||||
this.appOptions.canModifyFilter = (this.permissions.modifyFilter!==false);
|
||||
this.appOptions.canBranding = params.asc_getCustomization();
|
||||
|
@ -1019,6 +1019,8 @@ define([
|
|||
this.headerView.setBranding(this.editorConfig.customization);
|
||||
|
||||
this.appOptions.canRename && this.headerView.setCanRename(true);
|
||||
if (this.permissions.rename !== undefined)
|
||||
console.warn("Obsolete: The rename parameter of the document permission section is deprecated. Please use onRequestRename event instead.");
|
||||
} else
|
||||
this.appOptions.canModifyFilter = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue