rails declarative authorization, permit all actions for controller?
Posted
by
SooDesuNe
on Stack Overflow
See other posts from Stack Overflow
or by SooDesuNe
Published on 2010-12-26T20:27:32Z
Indexed on
2010/12/26
22:54 UTC
Read the original article
Hit count: 319
ruby-on-rails
|declarative-authorization
using the delcarative_authorization gem for rails, is there a shortcut to allow a role access to all controller actions?
privileges do
# default privilege hierarchies to facilitate RESTful Rails apps
privilege :manage, :includes => [:create, :read, :update, :delete]
end
isn't sufficient, because I have more controlling methods than just CRUD in my controllers.
Something like:
role :foo do
has_permission_on :bar, :to =>[:all]
end
would be perfect, but I'm not finding it in the docs.
© Stack Overflow or respective owner