Browse Source

Increase reset password expiry to 24 hours (#1935)

* feat: increase reset password expiry to 24 hours

* feat: increase csv expiration and copy
pull/1937/head
natdeanlewissoftwire 1 year ago committed by GitHub
parent
commit
c0dca7ec66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/jobs/email_csv_job.rb
  2. 2
      app/views/devise/passwords/new.html.erb
  3. 2
      config/initializers/devise.rb

2
app/jobs/email_csv_job.rb

@ -3,7 +3,7 @@ class EmailCsvJob < ApplicationJob
BYTE_ORDER_MARK = "\uFEFF".freeze # Required to ensure Excel always reads CSV as UTF-8 BYTE_ORDER_MARK = "\uFEFF".freeze # Required to ensure Excel always reads CSV as UTF-8
EXPIRATION_TIME = 3.hours.to_i EXPIRATION_TIME = 24.hours.to_i
def perform(user, search_term = nil, filters = {}, all_orgs = false, organisation = nil, codes_only_export = false, log_type = "lettings") # rubocop:disable Style/OptionalBooleanParameter - sidekiq can't serialise named params def perform(user, search_term = nil, filters = {}, all_orgs = false, organisation = nil, codes_only_export = false, log_type = "lettings") # rubocop:disable Style/OptionalBooleanParameter - sidekiq can't serialise named params
export_type = codes_only_export ? "codes" : "labels" export_type = codes_only_export ? "codes" : "labels"

2
app/views/devise/passwords/new.html.erb

@ -14,7 +14,7 @@
</h1> </h1>
<p class="govuk-body">Enter the email address you used to create your account.</p> <p class="govuk-body">Enter the email address you used to create your account.</p>
<p class="govuk-body">We’ll email you a link to reset your password. This link will expire in 3 hours.</p> <p class="govuk-body">We’ll email you a link to reset your password. This link will expire in 24 hours.</p>
<%= f.govuk_email_field :email, <%= f.govuk_email_field :email,
label: { text: "Email address" }, label: { text: "Email address" },

2
config/initializers/devise.rb

@ -225,7 +225,7 @@ Devise.setup do |config|
# Time interval you can reset your password with a reset password key. # Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to # Don't put a too small interval or your users won't have the time to
# change their passwords. # change their passwords.
config.reset_password_within = 3.hours config.reset_password_within = 24.hours
# When set to false, does not sign a user in automatically after their password is # When set to false, does not sign a user in automatically after their password is
# reset. Defaults to true, so a user is signed in automatically after a reset. # reset. Defaults to true, so a user is signed in automatically after a reset.

Loading…
Cancel
Save