📅  最后修改于: 2022-03-11 15:03:25.159000             🧑  作者: Mango
代码示例1
function HasRole(role) {
return function(req, res, next) {
if (role !== req.user.role) res.redirect(...);
else next();
}
}