From 4ffd1325bd22890378d2e2901c5f4b25003df25d Mon Sep 17 00:00:00 2001 From: Regev Brody Date: Wed, 10 Jun 2020 16:11:14 +0300 Subject: [PATCH] fix: sidebar is empty when the jwt token is expired (#2037) --- server/core/auth.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/core/auth.js b/server/core/auth.js index d10ba381..1142849e 100644 --- a/server/core/auth.js +++ b/server/core/auth.js @@ -118,6 +118,7 @@ module.exports = { const newToken = await WIKI.models.users.refreshToken(jwtPayload.id) user = newToken.user user.permissions = user.getGlobalPermissions() + user.groups = user.getGroups() req.user = user // Try headers, otherwise cookies for response