mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
403 browser title
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user