Sails.js(0.9v)控制器的策略定义为:
RabbitController:{
Run Code Online (Sandbox Code Playgroud)'*': false, nurture : 'isRabbitMother', feed : ['isNiceToAnimals', 'hasRabbitFood'] }
有没有办法将params传递给这些acls,例如:
RabbitController:{
Run Code Online (Sandbox Code Playgroud)'*': false, nurture : 'isRabbitMother(myparam)', feed : ['isNiceToAnimals(myparam1, myparam2)', 'hasRabbitFood(anotherParam)'] }
这可能会导致这些函数多次用于不同的参数.谢谢Arif