且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CanCan:限制用户根据其角色设置某些模型属性的能力

更新时间:2023-02-25 19:36:02

到目前为止,这是不可能的。但是根据此内容: https://github.com/ryanb/cancan/issues/326此功能应该在cancan 2.0中。

So far it is not possible. But according to this: https://github.com/ryanb/cancan/issues/326 this feature should be in cancan 2.0.

更新:您可以在CanCan 2.0分支上看到此功能: https://github.com/ryanb/cancan/tree/2.0 在资源属性部分

Update: you can see this on CanCan 2.0 branch here: https://github.com/ryanb/cancan/tree/2.0 in section "Resource Attributes"