mirror of https://github.com/zulip/zulip.git
Allow enterprise deployments to disable the use of Gravatar.
(imported from commit 49c14cc7629f2ffe6cedaab5d42ad5bf7f6569a4)
This commit is contained in:
parent
9cba43d49c
commit
a63f4284f0
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -36,6 +36,8 @@ def get_avatar_url(avatar_source, email):
|
|||
else:
|
||||
bucket = settings.S3_AVATAR_BUCKET
|
||||
return "https://%s.s3.amazonaws.com/%s?x=x" % (bucket, hash_key)
|
||||
else:
|
||||
elif settings.ENABLE_GRAVATAR:
|
||||
hash_key = gravatar_hash(email)
|
||||
return "https://secure.gravatar.com/avatar/%s?d=identicon" % (hash_key,)
|
||||
else:
|
||||
return '/static/images/default-avatar.png?x=x'
|
||||
|
|
|
@ -81,6 +81,10 @@ LOCAL_UPLOADS_DIR = "/home/zulip/uploads"
|
|||
# This is useful in settings where you're syncing names from an integrated LDAP/Active Directory
|
||||
NAME_CHANGES_DISABLED = False
|
||||
|
||||
# Controls whether users who have not uploaded an avatar will receive an avatar
|
||||
# from gravatar.com.
|
||||
ENABLE_GRAVATAR = True
|
||||
|
||||
### TWITTER INTEGRATION
|
||||
|
||||
# Zulip supports showing inline Tweet previews when a tweet is linked
|
||||
|
|
|
@ -265,6 +265,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
|||
'INLINE_IMAGE_PREVIEW': True,
|
||||
'CAMO_URI': None,
|
||||
'ENABLE_FEEDBACK': True,
|
||||
'ENABLE_GRAVATAR': True,
|
||||
}
|
||||
|
||||
for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
||||
|
|
Loading…
Reference in New Issue