Permission denied: No matching rules found

79 views
Skip to first unread message

zeroelink

unread,
Feb 2, 2012, 11:33:16 AM2/2/12
to declarative_authorization
I'm using declarative_authorization vers 0.54 with rails 3.1.0. I'm
seeing this permission denied exception:

Started GET "/vehicles" for 24.187.213.234 at 2012-02-02 10:58:10
-0500
Processing by VehiclesController#index as HTML
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id"
= 6 LIMIT 1
Permission denied: No matching rules found for index for #<User id: 6,
username: "djavia", firstname: "John", lastname: "Smith",
crypted_password:
"b0eb6d0ba2b01651fb28669874dc1baf4f031cd7f4182172bb6...",
password_salt: "TLb3b7GD3nfjehenK3bj", persistence_token:
"2a8cb57131a7af3340d399824dc7ebaca57553ad067171cc809...", created_at:
"2012-02-02 14:40:34", updated_at: "2012-02-02 14:40:34",
remember_me_token: nil, remember_me_token_expires_at: nil> (roles
[:owner], privileges [:index], context :vehicles).
Rendered public/403.html.erb within layouts/application (0.0ms)
Completed 403 Forbidden in 442ms (Views: 57.2ms | ActiveRecord: 0.9ms)

I'm not sure why I am getting this since the user does have the
necessary role on that action

Thanks

Steffen Bartsch

unread,
Feb 2, 2012, 3:25:16 PM2/2/12
to declarative_...@googlegroups.com
Am Donnerstag, 2. Februar 2012 schrieb zeroelink:
> User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id"
> = 6 LIMIT 1
> Permission denied: No matching rules found for index for #<User id: 6,
> username: "djavia"> (roles

> [:owner], privileges [:index], context :vehicles).
> Rendered public/403.html.erb within layouts/application (0.0ms)
> Completed 403 Forbidden in 442ms (Views: 57.2ms | ActiveRecord: 0.9ms)
>
> I'm not sure why I am getting this since the user does have the
> necessary role on that action

Well, the error says that the user does have the role :owner, but not the
required permission (:index). Maybe the privilege hierarchy is missing that
maps :index to :read?

Steffen

Reply all
Reply to author
Forward
0 new messages