Skip to content

Commit

Permalink
fix: redirect user logged if go to page login
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Dec 1, 2016
1 parent 77d5c46 commit 7a4db00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/middlewares/isAuthorized.js
Expand Up @@ -19,13 +19,13 @@ var middleware = function(req, res, next) {
res.user = user

if(!User.utils.isAbeRestrictedUrl(req.url)) {
// if (user != null && req.url.indexOf('/abe/users/login') > -1 && req.method === 'GET' ) {
// res.redirect('/abe/editor')
// return
// }else {
if (user != null && req.url.indexOf('/abe/users/login') > -1 && req.method === 'GET' ) {
res.redirect('/abe/editor')
return
}else {
next()
return
// }
}
}

var isHtml = /text\/html/.test(req.get('accept')) ? true : false
Expand Down

0 comments on commit 7a4db00

Please sign in to comment.