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