Hi! I’m having this problem:
my declarative authorization gem doesn’t allow the ADMIN even to see the
index of any page of my application ^^
i’m explaining better:
i have, in my user table, a boolean column named “admin”…in my user.rb
i wrote:
def role_symbol
[:admin] if admin?
end
and in my authorization_rules i have:
role :admin do
has_permission_on [:artists, :albums, :events, :neews],
:to => [:index, :show, :new, :create, :edit, :update, :destroy]
end
the problem is that when i login as an admin user(which has admin =
true) i can’t reach any model which has “filter_resource_access” in its
controller, i see the “You are not allowed to access this action.”
page…why?
when i’m not logged in(i’m a guest) it works as i want, i can see
anything but i can’t edit, create or destroy things…and that’s ok
Thanks a lot!