diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/user-right.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
6 | return function (req: express.Request, res: express.Response, next: express.NextFunction) { | 6 | return function (req: express.Request, res: express.Response, next: express.NextFunction) { |
7 | const user = res.locals.oauth.token.user | 7 | const user = res.locals.oauth.token.user |
8 | if (user.hasRight(userRight) === false) { | 8 | if (user.hasRight(userRight) === false) { |
9 | const message = `User ${user.username} does not have right ${UserRight[userRight]} to access to ${req.path}.` | 9 | const message = `User ${user.username} does not have right ${userRight} to access to ${req.path}.` |
10 | logger.info(message) | 10 | logger.info(message) |
11 | 11 | ||
12 | return res.status(403).json({ error: message }) | 12 | return res.status(403).json({ error: message }) |