Declarative authorization and the if_attribute not working...
Posted
by ro
on Stack Overflow
See other posts from Stack Overflow
or by ro
Published on 2010-06-06T20:04:20Z
Indexed on
2010/06/06
23:32 UTC
Read the original article
Hit count: 364
I've been having almost the same issues as Victor Martin (you can see the questions asked here).
I've got declarative authorization working for just about everything that doesn't involve using conditionals. E.g.
has_permission_on :users, :to => [:edit, :update, :destroy] do
if_attribute :user => is { current_user }
end
Are there any common pitfalls with Declarative Authorization? I'm using authlogic and I'm suspicious the 'current_user' method in the application controller might be the source of the problem.
© Stack Overflow or respective owner