All permissions with declarative_authorization
Posted
by pablorc
on Stack Overflow
See other posts from Stack Overflow
or by pablorc
Published on 2010-05-18T16:21:41Z
Indexed on
2010/05/18
19:30 UTC
Read the original article
Hit count: 213
ruby-on-rails
|declarative-authorization
Hi, I have a Rails application using Restful authentication and declarative authorization. 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? Something like:
role :admin do
has_permission_on :everything, :to => :manage
end
Or a uglier approach with introspection, maybe?
Thanks in advance
© Stack Overflow or respective owner