Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fetch user off policy

  • Loading branch information...
commit 275222311d47c22dd62afea9d7916927e44d8e40 1 parent 9bdff09
@thomasklemm authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/pundit.rb
View
2  lib/pundit.rb
@@ -59,7 +59,7 @@ def authorize(record, query=nil)
@_policy_authorized = true
unless policy(record).public_send(query)
e = NotAuthorizedError.new
- e.user, e.record, e.query = pundit_user, record, query
+ e.user, e.record, e.query = policy(record).user, record, query
raise e, "not allowed to #{query} this #{record}"
end
true

0 comments on commit 2752223

Please sign in to comment.
Something went wrong with that request. Please try again.