From df10b2527fb0ce498badf7c55c76ccfcae987e9d Mon Sep 17 00:00:00 2001 From: schlaifa Date: Wed, 22 Nov 2023 11:07:51 +0100 Subject: [PATCH 1/2] version 1.1.3 --- package.json | 4 ++-- src/frontend/ui/commun/Footer/Footer.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 417f23b5c..b003ac318 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "helios", - "version": "1.1.2", + "version": "1.1.3", "private": true, "scripts": { "amibroken": "yarn deadcode && yarn lint && yarn typecheck && yarn test && yarn build", @@ -151,4 +151,4 @@ "node": "16.16" }, "packageManager": "yarn@3.2.4" -} +} \ No newline at end of file diff --git a/src/frontend/ui/commun/Footer/Footer.tsx b/src/frontend/ui/commun/Footer/Footer.tsx index 3c87a61ae..5428f2aea 100644 --- a/src/frontend/ui/commun/Footer/Footer.tsx +++ b/src/frontend/ui/commun/Footer/Footer.tsx @@ -99,7 +99,7 @@ export const Footer = () => {
  • - v1.1.2 + v1.1.3
  • From dd0b9744f5ab5b40b2a4936c582b305002c6ed76 Mon Sep 17 00:00:00 2001 From: schlaifa Date: Thu, 30 Nov 2023 16:56:07 +0100 Subject: [PATCH 2/2] (hel-564) make settings page available only for super admins --- .../gateways/utilisateur-loader/TypeOrmUtilisateurLoader.ts | 2 +- src/frontend/ui/commun/Header/Header.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/infrastructure/gateways/utilisateur-loader/TypeOrmUtilisateurLoader.ts b/src/backend/infrastructure/gateways/utilisateur-loader/TypeOrmUtilisateurLoader.ts index 3dcefff16..6b9bd86b7 100644 --- a/src/backend/infrastructure/gateways/utilisateur-loader/TypeOrmUtilisateurLoader.ts +++ b/src/backend/infrastructure/gateways/utilisateur-loader/TypeOrmUtilisateurLoader.ts @@ -107,7 +107,7 @@ export class TypeOrmUtilisateurLoader implements UtilisateurLoader { async checkIfAdmin(userId: string): Promise { const user = await (await this.orm).getRepository(UtilisateurModel).findOneBy({ code: userId.trim() }); - if (user && (user.roleId === '1' || user.roleId === '2')) { + if (user && user.roleId === '1') { return true } else return false; } diff --git a/src/frontend/ui/commun/Header/Header.tsx b/src/frontend/ui/commun/Header/Header.tsx index baafe16ab..abd9a7e9e 100644 --- a/src/frontend/ui/commun/Header/Header.tsx +++ b/src/frontend/ui/commun/Header/Header.tsx @@ -157,7 +157,7 @@ export const Header = () => { Historique - {(data.user.role === '1' || data.user.role === '2') && ( + {data.user.role === '1' && (