Correct flag 'isEdit'

This commit is contained in:
ShimaginAndrey 2022-01-31 16:14:39 +03:00
parent cf2f8820b9
commit 0d3f356c1c

View file

@ -90,7 +90,7 @@ export class storeAppOptions {
this.canEdit = permissions.edit !== false && // can edit or review this.canEdit = permissions.edit !== false && // can edit or review
(this.config.canRequestEditRights || this.config.mode !== 'view') && isSupportEditFeature; // if mode=="view" -> canRequestEditRights must be defined (this.config.canRequestEditRights || this.config.mode !== 'view') && isSupportEditFeature; // if mode=="view" -> canRequestEditRights must be defined
// (!this.isReviewOnly || this.canLicense) && // if isReviewOnly==true -> canLicense must be true // (!this.isReviewOnly || this.canLicense) && // if isReviewOnly==true -> canLicense must be true
this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && isSupportEditFeature && true; this.isEdit = (this.canLicense || this.isEditDiagram || this.isEditMailMerge) && permissions.edit !== false && this.config.mode !== 'view' && isSupportEditFeature;
this.canComments = this.canLicense && (permissions.comment === undefined ? this.isEdit : permissions.comment) && (this.config.mode !== 'view'); 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.canComments = this.canComments && !((typeof (this.customization) == 'object') && this.customization.comments===false);
this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false); this.canViewComments = this.canComments || !((typeof (this.customization) == 'object') && this.customization.comments===false);