in services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts [121:147]
public isPassageway(parameter: string): Observable<boolean> {
return this.applicationServiceFacade
.buildGetEnvironmentHealthStatus()
.pipe(
map(response => {
if (response.status === HTTP_STATUS_CODES.OK) {
const data = response.body;
if (parameter === 'billing' && !data.billingEnabled) {
this.appRoutingService.redirectToHomePage();
return false;
}
if (parameter === 'audit' && !data.auditEnabled) {
this.appRoutingService.redirectToHomePage();
return false;
}
if (parameter === 'administration' && !data.admin && !data.projectAdmin) {
this.appRoutingService.redirectToNoAccessPage();
return false;
}
if (parameter === 'project-admin' && !data.admin && data.projectAdmin) {
this.appRoutingService.redirectToNoAccessPage();
return false;
}
}
return true;
}));
}