Skip to content

Commit

Permalink
feat: supprimer l'accès à mano (#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre authored Mar 5, 2024
1 parent 2f8965b commit 70494ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/src/middleware/versionCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions dashboard/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ const App = ({ resetRecoil }) => {
};
}, [authToken, refresh, initialLoadIsDone]);

return (
<div className="main-container">
<div className="tw-mb-8 tw-border-l-4 tw-border-orange-500 tw-bg-orange-100 tw-p-4 tw-text-orange-700" role="alert">
🚧 Mano est en cours de migration, vous devez patienter jusqu’au 6 mars, et vous rendre sur https://espace-mano.sesan.fr/
</div>
</div>
);

return (
<div className="main-container">
<ToastContainer transition={process.env.REACT_APP_TEST_PLAYWRIGHT !== 'true' ? Bounce : ToastifyFastTransition} />
Expand Down

0 comments on commit 70494ce

Please sign in to comment.