[bug] req.locales should include unpublished, if on home
This commit is contained in:
parent
48c5962efb
commit
23b59816c8
|
@ -66,7 +66,7 @@ app.use(async function (req, res, next) {
|
|||
req.rawUser = authenticate(req);
|
||||
req.user = req.rawUser && req.rawUser.authenticated ? req.rawUser : null;
|
||||
req.isGranted = (area = '', locale = global.config.locale) => req.user && isGranted(req.user, locale, area);
|
||||
req.locales = buildLocaleList();
|
||||
req.locales = buildLocaleList(global.config.locale, global.config.locale === '_');
|
||||
req.db = new LazyDatabase();
|
||||
req.isUserAllowedToPost = async () => {
|
||||
const user = await req.db.get(SQL`SELECT bannedReason FROM users WHERE id = ${req.user.id}`);
|
||||
|
|
Reference in New Issue