From bd45d503e5d007e730f4e81dccd7e7864c9a85cc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Aug 2020 14:58:01 +0200 Subject: Reorganize shared models --- server/middlewares/user-right.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares/user-right.ts') diff --git a/server/middlewares/user-right.ts b/server/middlewares/user-right.ts index 4d836485c..aaf0b323a 100644 --- a/server/middlewares/user-right.ts +++ b/server/middlewares/user-right.ts @@ -6,7 +6,7 @@ function ensureUserHasRight (userRight: UserRight) { return function (req: express.Request, res: express.Response, next: express.NextFunction) { const user = res.locals.oauth.token.user if (user.hasRight(userRight) === false) { - const message = `User ${user.username} does not have right ${UserRight[userRight]} to access to ${req.path}.` + const message = `User ${user.username} does not have right ${userRight} to access to ${req.path}.` logger.info(message) return res.status(403).json({ error: message }) -- cgit v1.2.3