mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
Allow enterprise deployments to disable the use of Gravatar.
(imported from commit 49c14cc7629f2ffe6cedaab5d42ad5bf7f6569a4)
This commit is contained in:
77
assets/default-default-avatar.svg
Normal file
77
assets/default-default-avatar.svg
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="128"
|
||||||
|
height="128"
|
||||||
|
id="svg2"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.48.4 r9939"
|
||||||
|
sodipodi:docname="default-default-avatar.svg"
|
||||||
|
inkscape:export-filename="/home/km/h/humbug/humbug/static/images/default-avatar.png"
|
||||||
|
inkscape:export-xdpi="90"
|
||||||
|
inkscape:export-ydpi="90">
|
||||||
|
<defs
|
||||||
|
id="defs4" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="1.28"
|
||||||
|
inkscape:cx="-110.80535"
|
||||||
|
inkscape:cy="59.888786"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="873"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="567"
|
||||||
|
inkscape:window-maximized="1" />
|
||||||
|
<metadata
|
||||||
|
id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-924.36218)">
|
||||||
|
<rect
|
||||||
|
style="fill:#eeeeee;fill-opacity:1;stroke:none"
|
||||||
|
id="rect2987"
|
||||||
|
width="128"
|
||||||
|
height="128"
|
||||||
|
x="0"
|
||||||
|
y="924.36218" />
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-size:118.2937088px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#cccccc;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
|
||||||
|
x="28.563871"
|
||||||
|
y="1029.661"
|
||||||
|
id="text2989"
|
||||||
|
sodipodi:linespacing="125%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan2991"
|
||||||
|
x="28.563871"
|
||||||
|
y="1029.661">?</tspan></text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/images/default-avatar.png
Normal file
BIN
static/images/default-avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@@ -36,6 +36,8 @@ def get_avatar_url(avatar_source, email):
|
|||||||
else:
|
else:
|
||||||
bucket = settings.S3_AVATAR_BUCKET
|
bucket = settings.S3_AVATAR_BUCKET
|
||||||
return "https://%s.s3.amazonaws.com/%s?x=x" % (bucket, hash_key)
|
return "https://%s.s3.amazonaws.com/%s?x=x" % (bucket, hash_key)
|
||||||
else:
|
elif settings.ENABLE_GRAVATAR:
|
||||||
hash_key = gravatar_hash(email)
|
hash_key = gravatar_hash(email)
|
||||||
return "https://secure.gravatar.com/avatar/%s?d=identicon" % (hash_key,)
|
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
|
# This is useful in settings where you're syncing names from an integrated LDAP/Active Directory
|
||||||
NAME_CHANGES_DISABLED = False
|
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
|
### TWITTER INTEGRATION
|
||||||
|
|
||||||
# Zulip supports showing inline Tweet previews when a tweet is linked
|
# Zulip supports showing inline Tweet previews when a tweet is linked
|
||||||
|
@@ -265,6 +265,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
|
|||||||
'INLINE_IMAGE_PREVIEW': True,
|
'INLINE_IMAGE_PREVIEW': True,
|
||||||
'CAMO_URI': None,
|
'CAMO_URI': None,
|
||||||
'ENABLE_FEEDBACK': True,
|
'ENABLE_FEEDBACK': True,
|
||||||
|
'ENABLE_GRAVATAR': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
for setting_name, setting_val in DEFAULT_SETTINGS.iteritems():
|
||||||
|
Reference in New Issue
Block a user