fix: missing guest global permissions (#788)
This commit is contained in:
parent
dbc5efc3b3
commit
5938a20785
@ -11,7 +11,7 @@ const _ = require('lodash')
|
||||
router.get('/robots.txt', (req, res, next) => {
|
||||
res.type('text/plain')
|
||||
if (_.includes(WIKI.config.seo.robots, 'noindex')) {
|
||||
res.send("User-agent: *\nDisallow: /")
|
||||
res.send('User-agent: *\nDisallow: /')
|
||||
} else {
|
||||
res.status(200).end()
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ module.exports = class User extends Model {
|
||||
minimum: 2,
|
||||
maximum: 255
|
||||
}
|
||||
},
|
||||
}
|
||||
}, { format: 'flat' })
|
||||
if (validation && validation.length > 0) {
|
||||
throw new WIKI.Error.InputInvalid(validation[0])
|
||||
@ -422,6 +422,7 @@ module.exports = class User extends Model {
|
||||
WIKI.logger.error('CRITICAL ERROR: Guest user is missing!')
|
||||
process.exit(1)
|
||||
}
|
||||
user.permissions = user.getGlobalPermissions()
|
||||
return user
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user