...
|
...
|
@@ -90,8 +90,12 @@ module.exports = function(req, res, next) { |
|
|
if(path&&req.session.user.allRight[path]){
|
|
|
author.validateAuthor(req.session.user.auth.pid,req.session.user.auth.role_id,path,function(data){
|
|
|
if(data.code!=200){
|
|
|
res.status(403);
|
|
|
res.render('error/error_nolayout',{message:NO_AUTH,layout:false,cssfile:CSS_FILE});
|
|
|
// res.status(403);
|
|
|
if(!req.xhr){
|
|
|
res.render('error/error_nolayout',{message:NO_AUTH,layout:false,cssfile:CSS_FILE});
|
|
|
}else{
|
|
|
res.json({code:201,message:"没有权限!"});
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
nextRedirect(method,path);
|
...
|
...
|
|