[DE PE SSE] Fix Bug 56709

This commit is contained in:
Andrey Shimagin 2022-04-19 15:54:18 +03:00
parent 3b7233a5d2
commit 8682735906
4 changed files with 8 additions and 8 deletions

View file

@ -639,7 +639,7 @@ const ViewComments = inject("storeComments", "storeAppOptions", "storeReview")(o
const viewMode = !storeAppOptions.canComments;
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
const isEdit = storeAppOptions.isEdit;
const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit;
const sortComments = comments.length > 0 ? [...comments].sort((a, b) => a.time > b.time ? -1 : 1) : null;
const [clickComment, setComment] = useState();
@ -749,7 +749,7 @@ const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(ob
const displayMode = storeReview.displayMode;
const viewMode = !storeAppOptions.canComments;
const isEdit = storeAppOptions.isEdit;
const isEdit = storeAppOptions.isEdit || storeAppOptions.isRestrictedEdit;
const comments = storeComments.showComments;
const [currentIndex, setCurrentIndex] = useState(0);

View file

@ -114,7 +114,7 @@ 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);
this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly;
this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly;
this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false);
this.canEditStyles = this.canLicense && this.canEdit;
@ -122,7 +122,7 @@ export class storeAppOptions {
this.fileKey = document.key;
const typeForm = /^(?:(oform))$/.exec(document.fileType); // can fill forms only in oform format
this.canFillForms = this.canLicense && !!(typeForm && typeof typeForm[1] === 'string') && ((permissions.fillForms===undefined) ? this.isEdit : permissions.fillForms) && (this.config.mode !== 'view');
this.isRestrictedEdit = !this.isEdit && (this.canComments || this.canFillForms);
this.isRestrictedEdit = !this.isEdit && (this.canComments || this.canFillForms) && isSupportEditFeature;
if (this.isRestrictedEdit && this.canComments && this.canFillForms) // must be one restricted mode, priority for filling forms
this.canComments = false;
this.trialMode = params.asc_getLicenseMode();

View file

@ -94,12 +94,12 @@ 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);
this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly;
this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly;
this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false);
this.canEditStyles = this.canLicense && this.canEdit;
this.canPrint = (permissions.print !== false);
this.isRestrictedEdit = !this.isEdit && this.canComments;
this.isRestrictedEdit = !this.isEdit && this.canComments && isSupportEditFeature;
this.trialMode = params.asc_getLicenseMode();
const type = /^(?:(pdf|djvu|xps|oxps))$/.exec(document.fileType);

View file

@ -94,11 +94,11 @@ 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);
this.canEditComments = this.isOffline || !(typeof (this.customization) == 'object' && this.customization.commentAuthorOnly) || !permissions.editCommentAuthorOnly;
this.canDeleteComments= this.isOffline || !permissions.deleteCommentAuthorOnly;
this.canChat = this.canLicense && !this.isOffline && (permissions.chat !== false);
this.canPrint = (permissions.print !== false);
this.isRestrictedEdit = !this.isEdit && this.canComments;
this.isRestrictedEdit = !this.isEdit && this.canComments && isSupportEditFeature;
this.trialMode = params.asc_getLicenseMode();
const type = /^(?:(pdf|djvu|xps|oxps))$/.exec(document.fileType);