fix: sidebar is empty when the jwt token is expired (#2037)

This commit is contained in:
Regev Brody 2020-06-10 16:11:14 +03:00 committed by GitHub
parent 1ca29dd66a
commit 4ffd1325bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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