简体   繁体   中英

How can I enter user page from active admin?

I'm using active admin in my rails application.

I want to enter user's account page from active admin page because I want to check what the user exactly is seeing.

I thought that I can decrypt devise encrypted password, but I found out that I cannot do that Rails Devise, how to unencrypt a password?

I tried entering the site by using the encrypted password, but I couldn't.

How can I implement this?

If it so important, you can copy encrypted password from db and paste own encrypted password for this user. You can do it via rails c . After your actions rewrite password again. But it is a bad way. You must write some tests for your app.

There is an example in the Devise Wiki How to : How To: Sign in as another user if you are an admin

The proposed solution replaces the current user in session, so I think you'll be signed out of ActiveAdmin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM