mirror of https://github.com/zulip/zulip.git
settings: Add support for ZULIP_ORG secrets.
These can be used to authenticate the current Zulip server to zulip.org.
This commit is contained in:
parent
540bfce83f
commit
55a9101573
|
@ -18,6 +18,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
|
|||
from django.utils.crypto import get_random_string
|
||||
import six
|
||||
import argparse
|
||||
import uuid
|
||||
from zerver.lib.str_utils import force_str
|
||||
from zerver.lib.utils import generate_random_token
|
||||
|
||||
|
@ -86,6 +87,12 @@ def generate_secrets(development=False):
|
|||
camo_key = old_conf.get('camo_key', get_random_string(64))
|
||||
lines.append(config_line('camo_key', camo_key))
|
||||
|
||||
zulip_org_key = old_conf.get('zulip_org_key', get_random_string(64))
|
||||
lines.append(config_line('zulip_org_key', zulip_org_key))
|
||||
|
||||
zulip_org_id = old_conf.get('zulip_org_id', str(uuid.uuid4()))
|
||||
lines.append(config_line('zulip_org_id', zulip_org_id))
|
||||
|
||||
if not development:
|
||||
# Write the Camo config file directly
|
||||
generate_camo_config_file(camo_key)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
ZULIP_VERSION = "1.5.1+git"
|
||||
PROVISION_VERSION = '4.16'
|
||||
PROVISION_VERSION = '4.17'
|
||||
|
|
|
@ -61,6 +61,10 @@ AVATAR_SALT = get_secret("avatar_salt")
|
|||
# restarted for triggering browser clients to reload.
|
||||
SERVER_GENERATION = int(time.time())
|
||||
|
||||
# Key to authenticate this server to zulip.org for push notifications, etc.
|
||||
ZULIP_ORG_KEY = get_secret("zulip_org_key")
|
||||
ZULIP_ORG_ID = get_secret("zulip_org_id")
|
||||
|
||||
if 'DEBUG' not in globals():
|
||||
# Uncomment end of next line to test JS/CSS minification.
|
||||
DEBUG = DEVELOPMENT # and platform.node() != 'your-machine'
|
||||
|
|
Loading…
Reference in New Issue