Make DEPLOYMENT_ROLE_KEY no longer required.

(imported from commit 046ce610d847cc987d3f6d584ccc0bc84b55df84)
This commit is contained in:
Tim Abbott 2015-08-20 23:02:44 -07:00
parent 90bfc39d55
commit 3e61714035
3 changed files with 7 additions and 11 deletions

View File

@ -192,10 +192,11 @@ def make_feedback_client():
verbose=True,
site=settings.FEEDBACK_TARGET)
# We probably could stop running this queue worker at all if ENABLE_FEEDBACK is False
@assign_queue('feedback_messages')
class FeedbackBot(QueueProcessingWorker):
def start(self):
if settings.FEEDBACK_EMAIL is None:
if settings.ENABLE_FEEDBACK and settings.FEEDBACK_EMAIL is None:
self.staging_client = make_feedback_client()
self.staging_client._register(
'forward_feedback',
@ -206,6 +207,8 @@ class FeedbackBot(QueueProcessingWorker):
QueueProcessingWorker.start(self)
def consume(self, event):
if not settings.ENABLE_FEEDBACK:
return
if settings.FEEDBACK_EMAIL is not None:
to_email = settings.FEEDBACK_EMAIL
subject = "Zulip feedback from %s" % (event["sender_email"],)
@ -214,9 +217,8 @@ class FeedbackBot(QueueProcessingWorker):
headers = {'Reply-To' : '"%s" <%s>' % (event["sender_full_name"], event["sender_email"])}
msg = EmailMessage(subject, content, from_email, [to_email], headers=headers)
msg.send()
return
self.staging_client.forward_feedback(event)
else:
self.staging_client.forward_feedback(event)
@assign_queue('error_reports')
class ErrorReporter(QueueProcessingWorker):

View File

@ -13,11 +13,6 @@ ZULIP_ADMINISTRATOR = ''
# The domain for your organization, e.g. example.com
ADMIN_DOMAIN = ''
# The deployment key is used by your server to authenticate any
# communication with Zulip. You can obtain your key from
# https://zulip.com/enterprise/download/deployment-key
DEPLOYMENT_ROLE_KEY = ''
# Enable at least one of the following authentication backends.
AUTHENTICATION_BACKENDS = (
# 'zproject.backends.EmailAuthBackend', # Email and password

View File

@ -370,7 +370,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
'DROPBOX_APP_KEY': '',
'ERROR_REPORTING': True,
'NAME_CHANGES_DISABLED': False,
'DEPLOYMENT_ROLE_NAME': ADMIN_DOMAIN,
'DEPLOYMENT_ROLE_NAME': "",
# The following bots only exist in non-ENTERPRISE installs
'ERROR_BOT': None,
'NEW_USER_BOT': None,
@ -409,7 +409,6 @@ MANAGERS = ADMINS
REQUIRED_SETTINGS = [("EXTERNAL_HOST", ""),
("ZULIP_ADMINISTRATOR", ""),
("ADMIN_DOMAIN", ""),
("DEPLOYMENT_ROLE_KEY", ""),
# SECRET_KEY doesn't really need to be here, in
# that we set it automatically, but just in
# case, it seems worth having in this list