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

pull/2051/head
Regev Brody 5 years ago committed by GitHub
parent 1ca29dd66a
commit 4ffd1325bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save