From 22c57424af4d0cd8d87ecf37b56374750c6e67a9 Mon Sep 17 00:00:00 2001 From: Paul O'Fallon Date: Sun, 9 Apr 2023 21:56:28 -0400 Subject: [PATCH] Always redirect to login provider when autoLogin is set --- server/controllers/common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/controllers/common.js b/server/controllers/common.js index 55cc4d33..02a07aac 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -450,6 +450,9 @@ router.get('/*', async (req, res, next) => { if (pageArgs.path === 'home' && req.user.id === 2) { return res.redirect('/login') } + if (WIKI.config.auth.autoLogin && req.user.id === 2) { + return res.redirect('/login') + } _.set(res.locals, 'pageMeta.title', 'Unauthorized') return res.status(403).render('unauthorized', { action: 'view'