feat(manager): resend reset password instructions
This commit is contained in:
parent
0f6203190f
commit
a221c57fbc
3 changed files with 13 additions and 0 deletions
|
@ -30,6 +30,13 @@ module Manager
|
|||
redirect_to manager_user_path(user)
|
||||
end
|
||||
|
||||
def resend_reset_password_instructions
|
||||
user = User.find(params[:id])
|
||||
user.send_reset_password_instructions
|
||||
flash[:notice] = "L'email de réinitialisation du mot de passe a été renvoyé."
|
||||
redirect_to manager_user_path(user)
|
||||
end
|
||||
|
||||
def enable_feature
|
||||
user = User.find(params[:id])
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ https://www.demarches-simplifiees.fr/users/password/new
|
|||
|
||||
Cordialement</pre>
|
||||
<% end %>
|
||||
|
||||
|
||||
<p><strong>Mot de passe perdu ?</strong> Vous pouvez <%= link_to('renvoyer l’email de réinitialisation', [:resend_reset_password_instructions, namespace, :user], method: :post, class: 'button') %>
|
||||
<small>Attention au téléscopage: cet email invalide les liens des emails similaires précédents.</small></p>
|
||||
|
||||
<p>
|
||||
<strong>Compte <a href="https://app-smtp.sendinblue.com/block">bloqué</a> chez Sendinblue ?</strong>
|
||||
Vous pouvez le <%= link_to('débloquer', manager_user_unblock_email_path(@user), method: :put, class: 'button') %>
|
||||
|
|
|
@ -41,6 +41,7 @@ Rails.application.routes.draw do
|
|||
resources :users, only: [:index, :show, :edit, :update] do
|
||||
delete 'delete', on: :member
|
||||
post 'resend_confirmation_instructions', on: :member
|
||||
post 'resend_reset_password_instructions', on: :member
|
||||
put 'enable_feature', on: :member
|
||||
get 'emails', on: :member
|
||||
put 'unblock_email'
|
||||
|
|
Loading…
Reference in a new issue