]> git.openstreetmap.org Git - rails.git/commitdiff
Make support email address configurable
authorTom Hughes <tom@compton.nu>
Sun, 20 Mar 2016 18:58:50 +0000 (18:58 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 20 Mar 2016 18:58:50 +0000 (18:58 +0000)
app/controllers/user_controller.rb
app/views/user/blocked.html.erb
app/views/user/suspended.html.erb
config/example.application.yml
config/locales/en.yml

index 766ab37d1396e437c4826b8d02b78b8e923c9fe8..e5515f727885e3464bb8372e8e7ce41f2b3a8f72 100644 (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
index 5f6e2b7f4d7d5b9fd7ad1d80c73ed35ce6fba5a5..93b4972d512809165efc12590f54d1e15796e4d9 100644 (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>
index 674f8bcbb1d9bc059b740b0565c9d94851c07ba4..22d85e166144933e903bf70d2bd6ee0abb88f911 100644 (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}") %>
index f60064a392ebb2bbbed8a4c7526139217e444037..5e2014ba96c3a86b0339ce6b5dfaa3bc33831105 100644 (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"
index 12cb76b044825c8a0003a6a4809725be3c1b220a..e65aba5bc26530528097be0308ee54f43fa4a8e3 100644 (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