stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 230 forks source link

permitted_to? returns different results when called from a helper #145

Closed cthielen closed 12 years ago

cthielen commented 12 years ago

I have a helper called "allowed_to?" which I use instead of permitted_to? so I can check whether the current_user is impersonating another user.

I've noticed that permitted_to? will return true from a helper even when the answer is false, and, when called from the view on the same request, will return false.

Any idea where this discrepancy might be coming from?