mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-03 04:25:21 +02:00
Allow users to update their email address (#1745)
* Change email address * Email confirmation * Email change test * Lint * Schema reset * Set test email sender * Select specific user fixture * Refactor/cleanup * Remove unused email_confirmation_token * Current user would never be true * Fix translation test failures
This commit is contained in:
parent
46e86a9a11
commit
41873de11d
28 changed files with 225 additions and 15 deletions
|
@ -18,10 +18,14 @@ Rails.application.configure do
|
|||
config.eager_load = ENV["CI"].present?
|
||||
|
||||
# Configure public file server for tests with Cache-Control for performance.
|
||||
config.public_file_server.enabled = true
|
||||
config.public_file_server.headers = {
|
||||
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
||||
}
|
||||
|
||||
# Set default sender email for tests
|
||||
ENV["EMAIL_SENDER"] = "hello@maybefinance.com"
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
@ -69,4 +73,6 @@ Rails.application.configure do
|
|||
config.active_record.encryption.encrypt_fixtures = true
|
||||
|
||||
config.autoload_paths += %w[test/support]
|
||||
|
||||
config.action_mailer.default_url_options = { host: "example.com" }
|
||||
end
|
||||
|
|
|
@ -73,3 +73,7 @@ en:
|
|||
or entering manually.
|
||||
update:
|
||||
success: "%{type} account updated"
|
||||
email_confirmations:
|
||||
new:
|
||||
success_login: "Your email has been confirmed. Please log in with your new email address."
|
||||
invalid_token: "Invalid or expired confirmation link."
|
||||
|
|
9
config/locales/views/email_confirmation_mailer/en.yml
Normal file
9
config/locales/views/email_confirmation_mailer/en.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
en:
|
||||
email_confirmation_mailer:
|
||||
confirmation_email:
|
||||
subject: "Maybe: Confirm your email change"
|
||||
greeting: "Hello!"
|
||||
body: "You recently requested to change your email address. Click the button below to confirm this change."
|
||||
cta: "Confirm email change"
|
||||
expiry_notice: "This link will expire in %{hours} hours."
|
|
@ -79,6 +79,7 @@ en:
|
|||
invitation_link: Invitation link
|
||||
invite_member: Add member
|
||||
last_name: Last Name
|
||||
email: Email
|
||||
page_title: Account
|
||||
pending: Pending
|
||||
profile_subtitle: Customize how you appear on Maybe
|
||||
|
@ -87,3 +88,6 @@ en:
|
|||
user_avatar_field:
|
||||
accepted_formats: JPG or PNG. 5MB max.
|
||||
choose: Choose
|
||||
users:
|
||||
update:
|
||||
success: Profile updated successfully
|
||||
|
|
|
@ -7,7 +7,9 @@ en:
|
|||
so via an invite code
|
||||
generate_tokens: Generate new code
|
||||
generated_tokens: Generated codes
|
||||
title: Require invite code for new sign ups
|
||||
title: Require invite code for signup
|
||||
email_confirmation_title: Require email confirmation
|
||||
email_confirmation_description: When enabled, users must confirm their email address when changing it.
|
||||
provider_settings:
|
||||
description: Configure settings for your hosting provider
|
||||
render_deploy_hook_label: Render Deploy Hook URL
|
||||
|
|
|
@ -4,4 +4,6 @@ en:
|
|||
destroy:
|
||||
success: Your account has been deleted.
|
||||
update:
|
||||
success: Your profile has been updated.
|
||||
success: "Your profile has been updated."
|
||||
email_change_initiated: "Please check your new email address for confirmation instructions."
|
||||
email_change_failed: "Failed to change email address."
|
||||
|
|
|
@ -9,6 +9,7 @@ Rails.application.routes.draw do
|
|||
resources :sessions, only: %i[new create destroy]
|
||||
resource :password_reset, only: %i[new create edit update]
|
||||
resource :password, only: %i[edit update]
|
||||
resource :email_confirmation, only: :new
|
||||
|
||||
resources :users, only: %i[update destroy]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue