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

This commit is contained in:
Valentin Mihai 2023-12-12 14:55:05 +02:00
parent 3a8f75bb95
commit 0215a6a516
2 changed files with 15 additions and 3 deletions

View File

@ -47,7 +47,7 @@
<iqser-circle-button
(action)="acceptRecommendation()"
*ngIf="annotationPermissions.canAcceptRecommendation"
*ngIf="canAcceptRecommendation"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
[type]="buttonType"
@ -101,7 +101,7 @@
<iqser-circle-button
(action)="annotationActionsService.forceAnnotation(annotations)"
*ngIf="annotationPermissions.canForceRedaction"
*ngIf="canForceRedaction"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-redaction.label' | translate"
[type]="buttonType"
@ -110,7 +110,7 @@
<iqser-circle-button
(action)="annotationActionsService.forceAnnotation(annotations, true)"
*ngIf="annotationPermissions.canForceHint"
*ngIf="canForceHint"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-hint.label' | translate"
[type]="buttonType"

View File

@ -88,6 +88,18 @@ export class AnnotationActionsComponent implements OnChanges {
return this.#annotationChangesAllowed && this.annotationPermissions.canRemoveRedaction && this.#sameType;
}
get canForceRedaction() {
return this.#annotationChangesAllowed && this.annotationPermissions.canForceRedaction;
}
get canForceHint() {
return this.#annotationChangesAllowed && this.annotationPermissions.canForceHint;
}
get canAcceptRecommendation() {
return this.#annotationChangesAllowed && this.annotationPermissions.canAcceptRecommendation;
}
get viewerAnnotations() {
return this._annotationManager.get(this.#annotations);
}