Make support email address configurable

This commit is contained in:
Tom Hughes 2016-03-20 18:58:50 +00:00
parent 945ff7911c
commit 6be39fca2f
5 changed files with 10 additions and 8 deletions

View file

@ -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

View file

@ -6,5 +6,5 @@
<div class="message">
<h1><%= t 'user.new.no_auto_account_create' %></h1>
<h2><%= raw t 'user.new.contact_webmaster' %></h2>
<h2><%= raw t 'user.new.contact_webmaster', :webmaster => "mailto:#{SUPPORT_EMAIL}" %></h2>
</div>

View file

@ -4,4 +4,4 @@
<h1><%= t "user.suspended.heading" %></h1>
<% 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}") %>

View file

@ -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 <webmaster@openstreetmap.org>"
email_from: "OpenStreetMap <support@openstreetmap.org>"
email_return_path: "bounces@openstreetmap.org"
# API version
api_version: "0.6"

View file

@ -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 <a href="mailto:webmaster@openstreetmap.org">webmaster</a> 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 <a href="%{webmaster}">webmaster</a> 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, <a href=\"%{reconfirm}\">click here</a>."
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.<br /><br />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.<br /><br />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