RED-8072 - Do not allow any annotations or annotation changes while auto-analysis is disabled

This commit is contained in:
Valentin Mihai 2023-12-13 12:23:07 +02:00
parent 549f791d3c
commit 52ea6fa92d

View File

@ -73,21 +73,21 @@ export class PdfAnnotationActionsService {
availableActions.push(editButton);
}
if (permissions.canAcceptRecommendation) {
if (permissions.canAcceptRecommendation && annotationChangesAllowed) {
const acceptRecommendationButton = this.#getButton('check', _('annotation-actions.accept-recommendation.label'), () =>
this.#annotationActionsService.convertRecommendationToAnnotation(annotations),
);
availableActions.push(acceptRecommendationButton);
}
if (permissions.canForceRedaction) {
if (permissions.canForceRedaction && annotationChangesAllowed) {
const forceRedactionButton = this.#getButton('thumb-up', _('annotation-actions.force-redaction.label'), () =>
this.#annotationActionsService.forceAnnotation(annotations),
);
availableActions.push(forceRedactionButton);
}
if (permissions.canForceHint) {
if (permissions.canForceHint && annotationChangesAllowed) {
const forceHintButton = this.#getButton('thumb-up', _('annotation-actions.force-hint.label'), () =>
this.#annotationActionsService.forceAnnotation(annotations, true),
);