url preview: Enable server level setting for url embed previews.

This significantly simplifies the process for enabling this feature in
new organizations.
This commit is contained in:
Puneeth Chaganti
2019-05-31 08:32:37 +05:30
committed by Tim Abbott
parent 8c0c9ca7a4
commit a1590c613e
5 changed files with 15 additions and 8 deletions

View File

@@ -7,6 +7,19 @@ All notable changes to the Zulip server are documented in this file.
This section lists notable unreleased changes; it is generally updated This section lists notable unreleased changes; it is generally updated
in bursts. in bursts.
**Upgrade notes:**
- The defaults for Zulip's inline URL preview setting have changed.
Previously, the server-level `INLINE_URL_EMBED_PREVIEW` setting was
disabled, and organization-level setting was enabled. Now, the
server-level setting is enabled by default, and the organization-level
setting is disabled. As a result, organization administrators can
configure this feature entirely in the UI. However, servers that had
previously [enabled previews of linked
websites](https://zulipchat.com/help/allow-image-link-previews) will
lose the setting and need to re-enable it.
### 2.0.3 -- 2019-04-23 ### 2.0.3 -- 2019-04-23
- Added documentation for upgrading the underlying OS version. - Added documentation for upgrading the underlying OS version.

View File

@@ -101,8 +101,6 @@ Some popular settings in `/etc/zulip/settings.py` include:
* The Twitter integration, which provides pretty inline previews of * The Twitter integration, which provides pretty inline previews of
tweets. tweets.
* The email gateway, which lets users send emails into Zulip. * The email gateway, which lets users send emails into Zulip.
* `INLINE_URL_EMBED_PREVIEW`, which controls our experimental feature
providing inline previews of links pasted into Zulip.
## Zulip announcement list ## Zulip announcement list

View File

@@ -1,4 +1,3 @@
# For the Dev VM environment, we use the same settings as the # For the Dev VM environment, we use the same settings as the
# sample prod_settings.py file, with a few exceptions. # sample prod_settings.py file, with a few exceptions.
from .prod_settings_template import * from .prod_settings_template import *
@@ -73,9 +72,6 @@ USING_PGROONGA = True
# Flush cache after migration. # Flush cache after migration.
POST_MIGRATION_CACHE_FLUSHING = True # type: bool POST_MIGRATION_CACHE_FLUSHING = True # type: bool
# Enable inline open graph preview in development for now
INLINE_URL_EMBED_PREVIEW = True
# Don't require anything about password strength in development # Don't require anything about password strength in development
PASSWORD_MIN_LENGTH = 0 PASSWORD_MIN_LENGTH = 0
PASSWORD_MIN_GUESSES = 0 PASSWORD_MIN_GUESSES = 0

View File

@@ -274,7 +274,7 @@ FEEDBACK_EMAIL = ZULIP_ADMINISTRATOR
# Controls whether or not Zulip will provide inline previews of # Controls whether or not Zulip will provide inline previews of
# websites that are referenced in links in messages. Note: this feature # websites that are referenced in links in messages. Note: this feature
# can also be disabled in a realm's organization settings. # can also be disabled in a realm's organization settings.
#INLINE_URL_EMBED_PREVIEW = False #INLINE_URL_EMBED_PREVIEW = True
# Controls whether or not Zulip will parse links starting with # Controls whether or not Zulip will parse links starting with
# "file:///" as a hyperlink (useful if you have e.g. an NFS share). # "file:///" as a hyperlink (useful if you have e.g. an NFS share).

View File

@@ -223,7 +223,7 @@ DEFAULT_SETTINGS = {
'ENABLE_FILE_LINKS': False, 'ENABLE_FILE_LINKS': False,
'ENABLE_GRAVATAR': True, 'ENABLE_GRAVATAR': True,
'INLINE_IMAGE_PREVIEW': True, 'INLINE_IMAGE_PREVIEW': True,
'INLINE_URL_EMBED_PREVIEW': False, 'INLINE_URL_EMBED_PREVIEW': True,
'NAME_CHANGES_DISABLED': False, 'NAME_CHANGES_DISABLED': False,
'AVATAR_CHANGES_DISABLED': False, 'AVATAR_CHANGES_DISABLED': False,
'PASSWORD_MIN_LENGTH': 6, 'PASSWORD_MIN_LENGTH': 6,