From dbc9c07b5591bba67f5e8d1aee787ae3ff0ea9bd Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 27 Aug 2015 16:34:01 -0400 Subject: [PATCH] 403 browser title --- src/controllers/helpers.js | 12 ++++++++++-- src/middleware/middleware.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js index 001c30c611..ffc20fb90a 100644 --- a/src/controllers/helpers.js +++ b/src/controllers/helpers.js @@ -36,9 +36,17 @@ helpers.notFound = function(req, res, error) { helpers.notAllowed = function(req, res, error) { if (req.uid) { if (res.locals.isAPI) { - res.status(403).json({path: req.path.replace(/^\/api/, ''), loggedIn: !!req.uid, error: error}); + res.status(403).json({ + path: req.path.replace(/^\/api/, ''), + loggedIn: !!req.uid, error: error, + title: '[[global:403.title]]' + }); } else { - res.status(403).render('403', {path: req.path, loggedIn: !!req.uid, error: error}); + res.status(403).render('403', { + path: req.path, + loggedIn: !!req.uid, error: error, + title: '[[global:403.title]]' + }); } } else { if (res.locals.isAPI) { diff --git a/src/middleware/middleware.js b/src/middleware/middleware.js index 1e787c1def..a94fd55038 100644 --- a/src/middleware/middleware.js +++ b/src/middleware/middleware.js @@ -519,7 +519,7 @@ middleware.requireUser = function(req, res, next) { return next(); } - res.render('403', {}); + res.render('403', {title: '[[global:403.title]]'}); }; function redirectToLogin(req, res) {