[DE] Fix protection: enable all protect options regardless of permissions; enable filling forms in edit mode; set track changes protection regardless of review permissions
This commit is contained in:
parent
2325c1c767
commit
49bbb8c2ef
|
@ -1053,12 +1053,13 @@ define([
|
||||||
Common.Utils.lockControls(Common.enumLock.docLockReview, props.isReviewOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
|
Common.Utils.lockControls(Common.enumLock.docLockReview, props.isReviewOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
|
||||||
Common.Utils.lockControls(Common.enumLock.docLockComments, props.isCommentsOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
|
Common.Utils.lockControls(Common.enumLock.docLockComments, props.isCommentsOnly, {array: [this.dlgChanges.btnAccept, this.dlgChanges.btnReject]});
|
||||||
}
|
}
|
||||||
if (this.appConfig.canReview) {
|
if (!this.appConfig.isReviewOnly) {
|
||||||
|
// protection in document is more important than permissions.review, call asc_SetLocalTrackRevisions even if canReview is false
|
||||||
if (props.isReviewOnly) {
|
if (props.isReviewOnly) {
|
||||||
this.onTurnPreview(true);
|
this.api.asc_SetLocalTrackRevisions(true);
|
||||||
this.onApiShowChange();
|
this.onApiShowChange();
|
||||||
} else if (this._state.prevReviewProtected) {
|
} else if (this._state.prevReviewProtected) {
|
||||||
this.onTurnPreview(false);
|
this.api.asc_SetLocalTrackRevisions(false);
|
||||||
this.onApiShowChange();
|
this.onApiShowChange();
|
||||||
}
|
}
|
||||||
this._state.prevReviewProtected = props.isReviewOnly;
|
this._state.prevReviewProtected = props.isReviewOnly;
|
||||||
|
|
|
@ -1547,7 +1547,7 @@ define([
|
||||||
this.appOptions.canEditContentControl = (this.permissions.modifyContentControl!==false);
|
this.appOptions.canEditContentControl = (this.permissions.modifyContentControl!==false);
|
||||||
this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false);
|
this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false);
|
||||||
this.appOptions.canSubmitForms = false; // this.appOptions.canLicense && (typeof (this.editorConfig.customization) == 'object') && !!this.editorConfig.customization.submitForm;
|
this.appOptions.canSubmitForms = false; // this.appOptions.canLicense && (typeof (this.editorConfig.customization) == 'object') && !!this.editorConfig.customization.submitForm;
|
||||||
this.appOptions.canFillForms = this.appOptions.canLicense && ((this.permissions.fillForms===undefined) ? this.appOptions.isEdit : this.permissions.fillForms) && (this.editorConfig.mode !== 'view');
|
this.appOptions.canFillForms = this.appOptions.canLicense && (this.appOptions.isEdit ? true : this.permissions.fillForms) && (this.editorConfig.mode !== 'view');
|
||||||
this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && (this.appOptions.canComments || this.appOptions.canFillForms);
|
this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && (this.appOptions.canComments || this.appOptions.canFillForms);
|
||||||
if (this.appOptions.isRestrictedEdit && this.appOptions.canComments && this.appOptions.canFillForms) // must be one restricted mode, priority for filling forms
|
if (this.appOptions.isRestrictedEdit && this.appOptions.canComments && this.appOptions.canFillForms) // must be one restricted mode, priority for filling forms
|
||||||
this.appOptions.canComments = false;
|
this.appOptions.canComments = false;
|
||||||
|
|
|
@ -201,9 +201,6 @@ define([
|
||||||
|
|
||||||
_setDefaults: function (props) {
|
_setDefaults: function (props) {
|
||||||
if (props) {
|
if (props) {
|
||||||
this.rbReview.setDisabled(!props.canReview);
|
|
||||||
this.rbForms.setDisabled(!props.canFillForms);
|
|
||||||
this.rbComments.setDisabled(!props.canComments);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue