diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-09-27 15:14:39 +1000 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-09-27 15:44:10 +1000 |
commit | 49fb299dde57e7db981ef31a7da12c6fd4761b01 (patch) | |
tree | cc55e96ab5ca6508b71063105242e1643adaac0b /app/models | |
parent | 8a7d5b4045e289cc1a316202a2373b3b44f8ff06 (diff) |
Add option to override all public body request emails
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 2cf1ce8a2..1c1ddb377 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -509,6 +509,15 @@ class PublicBody < ActiveRecord::Base return self.request_email_domain end + def request_email + override_email = MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "") + if override_email != "" + override_email + else + read_attribute(:request_email) + end + end + # Domain name of the request email def request_email_domain return PublicBody.extract_domain_from_email(self.request_email) |