Update parameters in section "permissions" for editComments
This commit is contained in:
parent
b3d2bea619
commit
0a5733c381
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue