From: Tom Hughes Date: Sun, 20 Mar 2016 18:58:50 +0000 (+0000) Subject: Make support email address configurable X-Git-Tag: live~3868 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6be39fca2fcf691285c4af64045348c42d49ee9a Make support email address configurable --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 766ab37d1..e5515f727 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -330,7 +330,7 @@ class UserController < ApplicationController flash[:error] = t "user.confirm_resend.failure", :name => params[:display_name] else Notifier.signup_confirm(user, user.tokens.create).deliver_now - flash[:notice] = t("user.confirm_resend.success", :email => user.email).html_safe + flash[:notice] = t("user.confirm_resend.success", :email => user.email, :sender => SUPPORT_EMAIL).html_safe end redirect_to :action => "login" @@ -516,7 +516,7 @@ class UserController < ApplicationController when "active", "confirmed" then successful_login(user, env["omniauth.params"]["referer"]) when "suspended" then - failed_login t("user.login.account is suspended", :webmaster => "mailto:webmaster@openstreetmap.org") + failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}") else failed_login t("user.login.auth failure") end @@ -559,7 +559,7 @@ class UserController < ApplicationController elsif user = User.authenticate(:username => username, :password => password, :pending => true) unconfirmed_login(user) elsif User.authenticate(:username => username, :password => password, :suspended => true) - failed_login t("user.login.account is suspended", :webmaster => "mailto:webmaster@openstreetmap.org"), username + failed_login t("user.login.account is suspended", :webmaster => "mailto:#{SUPPORT_EMAIL}"), username else failed_login t("user.login.auth failure"), username end diff --git a/app/views/user/blocked.html.erb b/app/views/user/blocked.html.erb index 5f6e2b7f4..93b4972d5 100644 --- a/app/views/user/blocked.html.erb +++ b/app/views/user/blocked.html.erb @@ -6,5 +6,5 @@

<%= t 'user.new.no_auto_account_create' %>

-

<%= raw t 'user.new.contact_webmaster' %>

+

<%= raw t 'user.new.contact_webmaster', :webmaster => "mailto:#{SUPPORT_EMAIL}" %>

diff --git a/app/views/user/suspended.html.erb b/app/views/user/suspended.html.erb index 674f8bcbb..22d85e166 100644 --- a/app/views/user/suspended.html.erb +++ b/app/views/user/suspended.html.erb @@ -4,4 +4,4 @@

<%= t "user.suspended.heading" %>

<% end %> -<%= raw t "user.suspended.body", :webmaster => link_to(t("user.suspended.webmaster"), "mailto:webmaster@openstreetmap.org") %> +<%= raw t "user.suspended.body", :webmaster => link_to(t("user.suspended.webmaster"), "mailto:#{SUPPORT_EMAIL}") %> diff --git a/config/example.application.yml b/config/example.application.yml index f60064a39..5e2014ba9 100644 --- a/config/example.application.yml +++ b/config/example.application.yml @@ -6,8 +6,10 @@ defaults: &defaults copyright_owner: "OpenStreetMap and contributors" attribution_url: "http://www.openstreetmap.org/copyright" license_url: "http://opendatacommons.org/licenses/odbl/1-0/" + # Support email address + support_email: support@openstreetmap.org # Sender addresses for emails - email_from: "OpenStreetMap " + email_from: "OpenStreetMap " email_return_path: "bounces@openstreetmap.org" # API version api_version: "0.6" diff --git a/config/locales/en.yml b/config/locales/en.yml index 12cb76b04..e65aba5bc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1767,7 +1767,7 @@ en: new: title: "Sign Up" no_auto_account_create: "Unfortunately we are not currently able to create an account for you automatically." - contact_webmaster: 'Please contact the webmaster to arrange for an account to be created - we will try and deal with the request as quickly as possible.' + contact_webmaster: 'Please contact the webmaster to arrange for an account to be created - we will try and deal with the request as quickly as possible.' about: header: Free and editable html: | @@ -1944,7 +1944,7 @@ en: unknown token: "That confirmation code has expired or does not exist." reconfirm_html: "If you need us to resend the confirmation email, click here." confirm_resend: - success: "We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping.

If you use an antispam system which sends confirmation requests then please make sure you whitelist webmaster@openstreetmap.org as we are unable to reply to any confirmation requests." + success: "We've sent a new confirmation note to %{email} and as soon as you confirm your account you'll be able to get mapping.

If you use an antispam system which sends confirmation requests then please make sure you whitelist %{sender} as we are unable to reply to any confirmation requests." failure: "User %{name} not found." confirm_email: heading: Confirm a change of email address