|
|
@@ -200,8 +200,15 @@ module.exports = function(crowi, app) {
|
|
|
return res.redirect('/');
|
|
|
}
|
|
|
|
|
|
- debug('Catch pageShow', err);
|
|
|
- return renderPage(null, req, res);
|
|
|
+ Page.hasPortalPage(path + '/', req.user)
|
|
|
+ .then(function(page) {
|
|
|
+ if (page) {
|
|
|
+ return res.redirect(path + '/');
|
|
|
+ } else {
|
|
|
+ debug('Catch pageShow', err);
|
|
|
+ return renderPage(null, req, res);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
};
|
|
|
|