Commit Graph

27292 Commits

Author SHA1 Message Date
Vishnu Ks 2b28042ddf models: Rename remaining audit log event types to past tense.
This makes the realm audit event type log entries more consistent.
2018-07-22 20:00:28 -07:00
Vishnu Ks 28167585b1 models: Rename several RealmAuditlog event types to past tense.
These event types haven't been used in production yet, and thus are
save to change without a migration.
2018-07-22 20:00:05 -07:00
amanagr 2d5ef27874 message-model: Add `zulipterminal` to sent_by_human clients.
Tweaked by tabbott to also more fully document this feature.
2018-07-22 12:32:55 -07:00
Cynthia Lin 84a977967b subs: Fix regression in Filter streams input focus during modal opening.
This behavior was originally implemented in commit 6993f89, but due to not
specifying a toggle option, the Subscribed/All streams switcher tab was
focused after the input was focused, leading to the input's loss of focus.

Fixes #9981.
2018-07-22 10:20:44 -04:00
Joshua Pan 0596632457 lint: Exclude frontend_tests/node_tests from $().text rule. 2018-07-20 12:13:56 -07:00
Lyla Fischer ccba727919 user docs: Update mute-a-topic.md. 2018-07-20 10:10:17 -07:00
Lyla Fischer e07bf51fc9 user docs: Update the message-actions template. 2018-07-20 10:10:17 -07:00
Steve Howell b9c9dd9b5a lint: Turn off the CSS checker (officially).
Our CSS checker globs for .css files.  Since the
SCSS cutover, it has been a no-op, so there's no
sense launching it.  See #8894 for details on
future plans.
2018-07-20 10:03:28 -04:00
Lyla Fischer 010dbcc49f user docs: Trim language in mute-a-stream. 2018-07-20 07:59:29 +05:30
Lyla Fischer 5a588353c1 user docs: Fix some wording in desktop notifications doc. 2018-07-20 07:24:49 +05:30
Abhigyan Khaund 29a95f3cbf desktop: Update app version to v2.3.3. 2018-07-19 10:54:58 -07:00
Anders Kaseorg a0293e8a86 zerver/lib/import_realm.py: Avoid shelling out for mkdir.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 195cc78470 zerver/lib/cache.py: Avoid shelling out for mkdir.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 8698198452 tools/update-authors-json: Avoid shelling out for cp.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 6a8f0165ee tools/test-help-documentation: Avoid shelling out for mkdir.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg f01942e510 tools/test-emoji-name-scripts: Avoid shelling out for cp.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 07f5b81406 tools/minify-js: Avoid shelling out for mkdir, cp.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 2d12b5b3d9 tools/diagnose: Avoid shelling out for pwd.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 09b8ccd510 scripts/nagios/check-rabbitmq-consumers: Avoid shelling out for mv.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg dbe65231fc puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time: Avoid shelling out for mv.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg f15cef27db frontend_tests/run-casper: Avoid shelling out for mkdir, rm.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Anders Kaseorg 8d52f0e0c0 analytics/management/commands/check_analytics_state.py: Avoid shelling out for mv.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-19 10:43:37 -07:00
Lyla Fischer f3b0b8edc8 user docs: Remove the admin.md macro. 2018-07-19 22:30:51 +05:30
Rishi Gupta b6d1b956f2 user docs: Rename restrict-editing-of-old-messages-and-topics. 2018-07-19 22:30:51 +05:30
Rishi Gupta 5ab373f714 user docs: Update article on configuring message editing and deletion. 2018-07-19 22:30:51 +05:30
Lyla Fischer efe22d339a user docs: Update disable-message-edit-history. 2018-07-19 22:30:51 +05:30
Lyla Fischer ad5f7a912e user docs: Update deactivate-or-reactivate-a-user. 2018-07-19 22:30:51 +05:30
Rishi Gupta b514cf66a1 user docs: Remove only-allow-admins-to-invite-new-users.
The information here was recently added to
manage-who-can-join-and-invite.md.
2018-07-19 22:25:58 +05:30
Rishi Gupta 72c0b57aa3 user docs: Remove allow-anyone-to-join-without-an-invitation.
The information here was recently added to manage-who-can-join-and-invite.

Arguably this is one we should save, since it is a distinctive feature not
offered by all of our competitors, and it gets some additional visibility by
being in the left sidebar. The model of having multiple things in the
sidebar pointing to the same article is getting messy though, and as our
feature count increases the cost of having stuff in the left sidebar is
increasing as well.
2018-07-19 22:25:58 +05:30
Rishi Gupta eab1142200 user docs: Remove restrict-user-email-addresses-to-certain-domains.
The information from this doc was recently added to
manage-who-can-join-and-invite.md.
2018-07-19 22:25:58 +05:30
Rishi Gupta ce1875533e user docs: Add manage-who-can-join-and-invite.md.
As we add more and more features, we'll want to consolidate articles into
feature bundles.
2018-07-19 22:25:58 +05:30
Lyla Fischer c301148e5a user docs: Update join-zulip-chat-badge. 2018-07-19 22:20:53 +05:30
Steve Howell 5d0a113634 minor: Add assertion to assert_realm_values() helper. 2018-07-19 12:07:11 -04:00
Tim Abbott f228eabd90 install: Make sure the en_US.UTF-8 locale is available.
We need to make sure the en_US.UTF-8 locale has been generated before
setting the locale via the environment.

Fixes part of #9946.
2018-07-18 15:05:27 -07:00
Anders Kaseorg f5d44e7355 Fork django-bitfield to save a few hundred ms of startup time
See #9953, https://github.com/zulip/django-bitfield/pull/1.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-18 15:24:15 -04:00
Marco Burstein 11cbe2bf6a lightbox: Fix a "Pan & Zoom" causing an error with thumbnailed images.
Images on the new thumbnailing system generate an error when
"Pan & Zoom" is enabled:

    Browser Error: Lightbox for unknown message undefined
    39648: http://localhost:9991/webpack/app.js
        | Object.blueslip_error [as error]
    50743: http://localhost:9991/webpack/app.js
        | Object../static/js/lightbox.js.exports.open
    50897: http://localhost:9991/webpack/app.js
        | HTMLDivElement.
    39474: http://localhost:9991/webpack/app.js
        | HTMLDivElement.blueslip_wrapper
    16299: http://localhost:9991/webpack/app.js
        | HTMLDivElement.dispatch
    16107: http://localhost:9991/webpack/app.js
        | HTMLDivElement.elemData.handle

To fix this, instead of using the `src` attribute as the key for
`asset_map`, which can be either the original or thumbnailed version
depending on the situation, always use the original version.

Also, create `frontend_tests/node_tests/lightbox.js` to test this
functionality.

Fix #9955.
2018-07-18 10:19:56 -07:00
Marco Burstein a6939a5078 lightbox: Fix lightbox not showing new thumbnails as selected.
The current code for detecting which image to add the `selected` class
to is `preview_source.match(src)`. With the new thumbnails, this no
longer works because thumbnail URLs include a `?`, which has its own
RegEx significance. To solve this, check for equality instead of using
RegExes.
2018-07-18 10:19:56 -07:00
Lyla Fischer 9149ac1cf4 user docs: Update default language doc. 2018-07-18 20:21:37 +05:30
Joshua Pan 2ccc7711ae tests: Test adding alert words ui. 2018-07-18 08:35:42 -04:00
Joshua Pan c485bdf05d tests: Cover render_alert_words_ui(). 2018-07-18 08:35:42 -04:00
Steve Howell eeac8cfa41 zjquery: Show multiple handlers in demo code.
This also makes the error messaging for true
duplicates a bit more specific.
2018-07-18 08:25:15 -04:00
Tim Abbott d3baa43167 thumbor: Clean up whitespace in thumbor.conf. 2018-07-15 17:52:39 +05:30
Aditya Bansal 529e4e76c8 thumbnaling: Support S3 upload backend in thumbor.
Credits for doing this goes to @sampritipanda.
2018-07-15 00:57:59 +05:30
Aditya Bansal 98a4e87e1d thumbor: Complete implementation of thumbnailing.
Various pieces of our thumbor-based thumbnailing system were already
merged; this adds the remaining pieces required for it to work:

* a THUMBOR_URL Django setting that controls whether thumbor is
  enabled on the Zulip server (and if so, where thumbor is hosted).

* Replaces the overly complicated prototype cryptography logic

* Adds a /thumbnail endpoint (supported both on web and mobile) for
  accessing thumbnails in messages, designed to support hosting both
  external URLs as well as uploaded files (and applying Zulip's
  security model for access to thumbnails of uploaded files).

* Modifies bugdown to, when THUMBOR_URL is set, render images with the
  `src` attribute pointing /thumbnail (to provide a small thumbnail
  for the image), along with adding a "data-original" attribute that
  can be used to access the "original/full" size version of the image.

There are a few things that don't work quite yet:
* The S3 backend support is incomplete and doesn't work yet.
* The error pages for unauthorized access are ugly.
* We might want to rename data-original and /thumbnail?size=original
  to use some other name, like "full", that better reflects the fact
  that we're potentially not serving the original image URL.
2018-07-15 00:39:41 +05:30
Tim Abbott 85d7ddbeca thumbor: Switch thumbor.conf to use a better system.
Previously, thumbor.conf read LOCAL_UPLOADS_DIR from
zproject/settings.py by calling get-django-setting, which ends up
importing Django (taking 250ms, and requiring a full Zulip virtualenv
to be installed on the system).

The new system (in production) just imports prod_settings.py, which
has a lot fewer dependencies and is also a lot faster.
2018-07-15 00:05:05 +05:30
Aditya Bansal 0e50afb599 thumbor: Add ldap and django as a dependancy.
We add this dependancy to thumbor for no use other than making an
import possible in one of the upcoming commits. Basically we wanted to
import LOCAL_UPLOADS_DIR from zproject.prod_settings or
zproject.dev_settings and prod_settings_template.py imports
django-auth-ldap (which depends on python-ldap and django).

This seems counterproductive, but it makes it possible for us to save
significant thumbor server startup time that would have been consumed
in `get-django-setting`, and once thumbor supports Python 3, we'll
probably be merging the virtualenvs anyway (in which case this change
would become a no-op).
2018-07-15 00:03:21 +05:30
Tim Abbott 52f5d83c90 thumbor: Add libthumbor dependency.
We need this for signing thumbnail requests from within Zulip.
2018-07-14 21:46:02 +05:30
Tim Abbott 50588274ff zthumbor: Use get_secret to configure thumbor.conf.
We need to use the value of SECURITY_KEY read from
/etc/zulip/zulip-secrets.conf (using get_secret), and also we disable
a few Thumbor features that we're not using. We also fix access to
secret keys by getting their values using get_secret.
2018-07-14 21:45:33 +05:30
Sarah de2ec8a05c notification settings: Add UI for stream email notifications.
Previous commits have fully implemented the logic for stream email
notifications; this final commit adds support for configuring it to
the UI.

Fixes #6511.
2018-07-14 12:19:33 +05:30
Sarah de947445ca event_queue: Add stream_email_notify.
This adds support to the event queue system for triggering
missed-message notifications (whether push or email) to support the
stream push notifications feature.
2018-07-14 12:19:33 +05:30