From 2e9eb8efed0bcdfde90016a02bf9b874fc5bba92 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 19 Jan 2020 15:09:56 -0500 Subject: [PATCH] better unauthorized message --- src/auth/loadPolicy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/loadPolicy.js b/src/auth/loadPolicy.js index 5df94cdeb8..c64a9f79d2 100644 --- a/src/auth/loadPolicy.js +++ b/src/auth/loadPolicy.js @@ -15,11 +15,11 @@ export const loadPolicy = (policy) => { if (policy) { if (!policy(req.user)) { return res.status(HttpStatus.FORBIDDEN) - .send('Role not authorized.'); + .send('Not authorized.'); } return next(); } - requireAuth(req, res); + return requireAuth(req, res); }]; };