diff options
| author | Luc Donnet | 2015-02-04 10:41:46 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2015-02-04 10:41:46 +0100 | 
| commit | b8b76e64cadd7796bc0f0be6ebfe47d75cdc56f3 (patch) | |
| tree | d6c3902b0100657f792fcbffa38ff37139b6cf83 | |
| parent | 7498c6e18093dc342c0989447f2000d839bf79ea (diff) | |
| download | chouette-core-b8b76e64cadd7796bc0f0be6ebfe47d75cdc56f3.tar.bz2 | |
Use devise secret key now for token (invitation, confirmation...)
6 files changed, 6 insertions, 6 deletions
| diff --git a/app/views/devise/mailer/confirmation_instructions.fr.html.erb b/app/views/devise/mailer/confirmation_instructions.fr.html.erb index 035ee5af5..a719299ff 100644 --- a/app/views/devise/mailer/confirmation_instructions.fr.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.fr.html.erb @@ -2,5 +2,5 @@  <p>Vous pouvez confirmer votre compte email en cliquant sur le lien suivant:</p> -<p><%= link_to 'Confirmer mon compte', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p> +<p><%= link_to 'Confirmer mon compte', confirmation_url(@resource, :confirmation_token => @token) %></p> diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index a5c4585e8..99fd7b743 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -2,4 +2,4 @@  <p>You can confirm your account email through the link below:</p> -<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p> +<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p> diff --git a/app/views/devise/mailer/reset_password_instructions.fr.html.erb b/app/views/devise/mailer/reset_password_instructions.fr.html.erb index a69d10ae5..7074a4c70 100644 --- a/app/views/devise/mailer/reset_password_instructions.fr.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.fr.html.erb @@ -2,7 +2,7 @@  <p>Une demande de changement de mot de passe a été reçue, vous pouvez modifier votre mot de passe en suivant le lien ci-dessous.</p> -<p><%= link_to 'Modifier mon mot de passe', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p> +<p><%= link_to 'Modifier mon mot de passe', edit_password_url(@resource, :reset_password_token => @token) %></p>  <p>Si vous ne souhaitez pas modifier votre mot de passe, ignorez ce message.</p>  <p>Votre mot de passe est conservé jusqu'à ce que vous suiviez le lien ci-dessus et que vous définissiez un nouveau mot de passe.</p> diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb index ae9e888ab..8489e53d8 100644 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -2,7 +2,7 @@  <p>Someone has requested a link to change your password, and you can do this through the link below.</p> -<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p> +<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>  <p>If you didn't request this, please ignore this email.</p>  <p>Your password won't change until you access the link above and create a new one.</p> diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb index 2263c2195..06ecbe409 100644 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -4,4 +4,4 @@  <p>Click the link below to unlock your account:</p> -<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p> +<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p> diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index c74dcd7b9..c3f251477 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -4,7 +4,7 @@ Devise.setup do |config|   # The secret key used by Devise. Devise uses this key to generate    # random tokens. Changing this key will render invalid all existing    # confirmation, reset password and unlock tokens in the database. -  config.secret_key = 'e9b20cea45078c982c9cd42cc64c484071d582a3d366ad2b51f676d168bccb2e0fd20e87ebe64aff57ad7f8a1a1c50b76cb9dc4039c287a195f9621fdb557993' +  config.secret_key =  Rails.env.production? ? ENV['DEVISE_SECRET_KEY'] : 'e9b20cea45078c982c9cd42cc64c484071d582a3d366ad2b51f676d168bccb2e0fd20e87ebe64aff57ad7f8a1a1c50b76cb9dc4039c287a195f9621fdb557993'    # ==> Mailer Configuration    # Configure the e-mail address which will be shown in Devise::Mailer, | 
