Passing a user object to permitted_to?

10 views
Skip to first unread message

Christopher Thielen

unread,
May 21, 2012, 9:48:53 PM5/21/12
to declarative_authorization
(continuing this discussion from a private e-mail)

I'm implementing a custom helper that lets me see if the current user
is impersonating another user (for administrative purposes).

I know I can called permitted_to? in a helper, but permitted_to? does
not seem to accept a user object or check against anything besides
current_user.

Am I wrong about that, or do I need to swap current_user in and out
when I call permitted_to? to get the behavior I'm looking for?
Reply all
Reply to author
Forward
0 new messages