From 90d0921615b4e6343f05503587c82cc82e11ee7c Mon Sep 17 00:00:00 2001 From: Pierre Narcisi Date: Fri, 15 Sep 2023 11:18:28 +0200 Subject: [PATCH] fix(validation) change the permission to validation R --- .../src/app/shared/alertInfoModule/alert-Info.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts index 048c7b7c0e..9f78949edc 100644 --- a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts +++ b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts @@ -51,7 +51,10 @@ export class AlertInfoComponent implements OnInit, OnChanges { }); } ngOnChanges() { - this.canChangeAlert = this.userCruved?.R && this.userCruved?.R > 0 && !isEmpty(this.alert); + let moduleValidation = this.moduleService.getModule('VALIDATION'); + + this.canChangeAlert = + moduleValidation?.cruved?.R && moduleValidation?.cruved?.R > 0 && !isEmpty(this.alert); } /** * Create new alert with /reports GET service