search and reset routes, the very last of the views to be refactored :shipit:

This commit is contained in:
psychobunny
2014-03-03 17:16:53 -05:00
parent 8802fc5a33
commit c24c2a5422
3 changed files with 40 additions and 59 deletions

View File

@@ -46,6 +46,12 @@ middleware.prepareAPI = function(req, res, next) {
next();
};
middleware.guestSearchingAllowed = function(req, res, next) {
if (!req.user && meta.config.allowGuestSearching !== '1') {
return res.redirect('/403');
}
};
middleware.checkGlobalPrivacySettings = function(req, res, next) {
var callerUID = req.user ? parseInt(req.user.uid, 10) : 0;