[英]All permissions with declarative_authorization
I have a Rails application using Restful authentication and declarative authorization. 我有一个使用Restful身份验证和声明性授权的Rails应用程序。 I have some roles with an admin.
我和管理员有一些角色。
Is there any method to have automatically granted all permissions to this role, instead of hardcode every controller in the authorization_rules? 是否有任何方法可以自动授予该角色所有权限,而不是对Authorization_rules中的每个控制器进行硬编码? Something like:
就像是:
role :admin do
has_permission_on :everything, :to => :manage
end
Or a uglier approach with introspection, maybe? 还是内省的更丑陋的方法?
Thanks in advance 提前致谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.