From 7a4857046680eb875153e9565da8b82a87f22ee0 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 8 Aug 2026 13:21:06 +0000 Subject: [PATCH] Edit README.md via Editor --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0767ad9..7f55116 100644 --- a/README.md +++ b/README.md @@ -241,4 +241,10 @@ The **docker folder** contains a couple of helper scripts: Afterwards, continue to start your project in the backend directory by running: - `yarn start` \ No newline at end of file + `yarn start` + function ensureAdmin(req, res, next) { + if (req.isAuthenticated() && req.user.role === 'admin') { + return next(); + } + res.status(403).send('Access Denied'); +} \ No newline at end of file