Merge branch 'VM/RED-8072' into 'master'

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

Closes RED-8072

See merge request redactmanager/red-ui!226
This commit is contained in:
Dan Percic 2023-12-13 11:34:56 +01:00
commit 5d771913dd

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),
);