From 70494ce0064a4c947ef5e0e9506ad5a104cdada1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Tue, 5 Mar 2024 08:41:43 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20supprimer=20l'acc=C3=A8s=20=C3=A0=20man?= =?UTF-8?q?o=20(#1885)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/src/middleware/versionCheck.js | 7 +++++++ dashboard/src/app.js | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/api/src/middleware/versionCheck.js b/api/src/middleware/versionCheck.js index c44c84eae..5e0634653 100644 --- a/api/src/middleware/versionCheck.js +++ b/api/src/middleware/versionCheck.js @@ -3,6 +3,13 @@ const { VERSION, MINIMUM_DASHBOARD_VERSION } = require("../config"); module.exports = ({ headers: { version, platform } }, res, next) => { if (platform === "website") return next(); if (platform === "dashboard") { + res.header("X-API-VERSION", "50.1.1"); + res.header("X-MINIMUM-DASHBOARD-VERSION", "50.1.1"); + res.header("Access-Control-Expose-Headers", "X-API-VERSION, X-MINIMUM-DASHBOARD-VERSION"); + return res.status(403).send({ + ok: false, + error: "Mano est en cours de migration vers Sesan. Vous pourrez vous connecter sur https://espace-mano.sesan.fr/ à partir du mercredi 6 mars", + }); // Add header with API version to compare with client. res.header("X-API-VERSION", VERSION); res.header("X-MINIMUM-DASHBOARD-VERSION", MINIMUM_DASHBOARD_VERSION); diff --git a/dashboard/src/app.js b/dashboard/src/app.js index b59b15686..289f5ee12 100644 --- a/dashboard/src/app.js +++ b/dashboard/src/app.js @@ -123,6 +123,14 @@ const App = ({ resetRecoil }) => { }; }, [authToken, refresh, initialLoadIsDone]); + return ( +
+
+ 🚧 Mano est en cours de migration, vous devez patienter jusqu’au 6 mars, et vous rendre sur https://espace-mano.sesan.fr/ +
+
+ ); + return (