nodejs 有比較完善的權(quán)限框架嗎
1 回答

慕娘9325324
TA貢獻1783條經(jīng)驗 獲得超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']
}
}
里面可以寫各種限制設(shè)置
- 1 回答
- 0 關(guān)注
- 741 瀏覽
添加回答
舉報
0/150
提交
取消