how to avoid 'already_authenticated' after an admin updated a user

92 views
Skip to first unread message

kadoudal

unread,
Jul 17, 2012, 6:06:01 AM7/17/12
to Devise
I use a specific admins_controller to manage the back office ( w
superadmin, manager, employee roles )
being a super admin, I can update managers/employee data.

regarding credentials, I can :
- update manager/employee email no problem
- reset manager/employee password, sending the Devise instructions

in this latest scenario, I use the standard devise url:
password_path( @admin) to send the email,
but I got a slight issue, the return url is the standard one :
after_sending_reset_password_instructions_path_for
and I get a flash notice : already_authenticated

is it right to modify the Backoffice::PasswordsController <
Devise::PasswordsController create action
checking if the current_admin is not the resource (email receiver) and
redirect to another url ? or is t bad design ?

thanks for tips
Reply all
Reply to author
Forward
0 new messages