Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: supprimer l'accès à mano #1885

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading