ruby on rails - Force Restful Authentication to login as a specific user (an admin function)? -


I am using strong authentication and I'm going to log on to our site as different users to check for problems They may be able to ("See what they see"). Since all passwords are encrypted I obviously can not use only my password.

So, how can I apply sessions to log in as a specific user?

  • Add action to your sessions_controller Impersonation like this:

    imputation of def user = User.find (params [: id]) logout_killing_session!
  • Then expand session resources with member in your routes. Cloned: :

    map.resource: session ,: Member = & gt; {: Impersonation = & gt; Finally, add a button anywhere for every user named "Impersonation" in your admin views, it will have to look something like this (assuming That user is in the local variable user ):

      
    
      

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -