email_mirror: Clean up EMAIL_GATEWAY_EXAMPLE setting.

This isn't something that a user can ever modify, so it doesn't belong
in DEFAULT_SETTINGS.  While we're at it, we align the appearance of
the email gateway in the docs with whether this setting in the docs
will be valid.
This commit is contained in:
Tim Abbott
2017-09-29 21:32:26 -07:00
parent e90b37d9a6
commit 94ba678f5b
2 changed files with 3 additions and 2 deletions

View File

@@ -133,7 +133,7 @@ class BotIntegration(Integration):
class EmailIntegration(Integration):
def is_enabled(self):
# type: () -> bool
return settings.EMAIL_GATEWAY_BOT != ""
return settings.EMAIL_GATEWAY_PATTERN != ""
class WebhookIntegration(Integration):
DEFAULT_FUNCTION_PATH = 'zerver.webhooks.{name}.view.api_{name}_webhook'

View File

@@ -191,7 +191,6 @@ DEFAULT_SETTINGS.update({
# These are undocumented, and we don't set them in dev_settings.py
# or test_settings.py , either.
# TODO: document them.
'EMAIL_GATEWAY_EXAMPLE': '',
'EMAIL_GATEWAY_PASSWORD': None,
'EMAIL_GATEWAY_EXTRA_PATTERN_HACK': None,
'STAGING': False,
@@ -562,6 +561,8 @@ for bot in INTERNAL_BOTS:
if EMAIL_GATEWAY_PATTERN != "":
EMAIL_GATEWAY_EXAMPLE = EMAIL_GATEWAY_PATTERN % ("support+abcdefg",)
else:
EMAIL_GATEWAY_EXAMPLE = ""
DEPLOYMENT_ROLE_KEY = get_secret("deployment_role_key")