nodejs 有比较完善的权限框架吗
1 回答
慕娘9325324
TA贡献1783条经验 获得超4个赞
sails有个policy目录
policies.js
{
ProfileController: {
// Apply the 'isLoggedIn' policy to the 'edit' action of 'ProfileController'
edit: 'isLoggedIn'
// Apply the 'isAdmin' AND 'isLoggedIn' policies, in that order, to the 'create' action
create: ['isAdmin', 'isLoggedIn']
}
}
里面可以写各种限制设置
- 1 回答
- 0 关注
- 728 浏览
添加回答
举报
0/150
提交
取消