ruby on rails - Login in to main app from active admin -


i have app, , connected active admin. i'm trying let admin user login user via active admin without password using devises's sign_in @user method. possible achieve out of box?

i can make redirect username in params/session, isnt secure, if wouldnt pass outside active admin.

any ideas?

i'm not sure mean "not secure"; devise internals can make sure admin user, etc, , need pass around username of new user. said, code below entirely within activeadmin , achieve want.

n.b. can't think of easy way sign admin user in (i use same devise users , use role-based auth).

member_action :sign_in_as, :method => :put   user = user.find(params[:id])   sign_in user, bypass: true   redirect_to root_path end  action_item :only => :show   link_to('sign in as', sign_in_as_admin_user_path(user), method: 'put') end 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -