Commit Graph

1574 Commits

Author SHA1 Message Date
Tim Abbott
c2bee5a89b auth: Fix fetch_auth_backends to properly report supported methods.
This fixes 2 related issues:
* We incorrectly would report authentication methods that are
  supported by a server (but have been disabled for a given
  realm/subdomain) as supported.
* We did not return an error with an invalid subdomain on a valid
  Zulip server.
* We did not return an error when requesting auth backends for the
  homepage if SUBDOMAINS_HOMEPAGE is set.

Comes with complete tests.
2017-03-09 21:37:00 -08:00
Amy Liu
e5ab3123af Migrate json/set_muted_topics to muting/topics. 2017-03-09 20:52:29 -08:00
Amy Liu
9500c88e32 Migrate legacy url json/bulk_invite_users to invite/bulk_invite. 2017-03-09 20:51:03 -08:00
Umair Khan
32849b80ad Django 1.10: Url pattern doesn't use _callback_str.
Fixes #3941
2017-03-09 00:50:12 -08:00
Tim Abbott
ac20872f9d request: Fix unnecessary translation tag for assertion. 2017-03-09 00:38:14 -08:00
Tim Abbott
8bdbcbc371 lint: Fix unnecessarily translated test file strings.
Our linter for translation strings shouldn't check test files, since
then we'll end up translating non-user-facing strings.

So we fix that, and actually add the opposite lint rule.
2017-03-09 00:37:44 -08:00
Tim Abbott
ac138b6e93 templates: Rename landing-nav.html to landing_nav.html. 2017-03-08 17:30:44 -08:00
Tim Abbott
3b59e6c3cc subs: Rename /#subscriptions to /#streams.
Fixes #3653.
2017-03-08 16:57:58 -08:00
Rishi Gupta
3797fa657e Change bot domains to string_id.EXTERNAL_HOST.
Change applies to both subdomains and non-subdomains case, though we use
just the EXTERNAL_HOST in the non-subdomains case if there is only 1 realm.

Fixes #3903.
2017-03-08 16:26:13 -08:00
Elliott Jin
8d936601d3 test-backend: Raise zerver/views/test_upload.py test coverage to 100%. 2017-03-08 11:42:25 -08:00
Tim Abbott
841e81d21e tests: Fix six.moves range import placement. 2017-03-08 11:36:04 -08:00
Tim Abbott
cb14b4405c tests: Rename zerver/tests/tests.py to test_users.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
8675be2daf tests: Move ModelTest to test_presence.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
ff7e3a2125 tests: Move ExtractedRecipientsTest test to test_messages.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
ff598a091c tests: Extract zerver/tests/test_muting.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
352551503c tests: Move UtilsUnitTest test to test_docs.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
c0f43ce343 tests: Move PublicURLTest tests to test_urls.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
a2ebece9b7 tests: Move login-related tests to test_signup.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
94ed405c69 tests: Extract zerver/tests/test_middleware.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
46362dfcca tests: Move AuthorsPageTest to test_docs.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
881169f08a tests: Move DocPageTest to test_docs.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
edbb3fa4ec tests: Rename test_integrations to test_docs. 2017-03-08 03:57:37 -08:00
Tim Abbott
729bcc8b16 tests: Move TestOpenRealms to test_signup.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
e8b08d10f0 tests: Extract zerver/tests/test_notifications.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
eefd5d4cf6 tests: Move UserChangesTest to test_settings.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
3d98b1cdef tests: Extract zerver/tests/test_queue_worker.py. 2017-03-08 03:57:37 -08:00
Tim Abbott
4e34719563 tests: Extract zerver/tests/test_realm.py. 2017-03-08 03:15:16 -08:00
Tim Abbott
b5cca309d6 tests: Extract zerver/tests/test_settings.py. 2017-03-08 03:13:28 -08:00
Tim Abbott
123b4c1877 tests: Extract zerver/tests/test_bots.py. 2017-03-08 03:09:32 -08:00
Tim Abbott
7d9e80599b tests: Extract zerver/tests/test_zephyr.py. 2017-03-08 03:08:30 -08:00
Tim Abbott
c66549dee0 tests: Extract zerver/tests/test_home.py. 2017-03-08 03:00:05 -08:00
Tim Abbott
7aa9dc3922 Fix test_templates failure with new landing-nav.html. 2017-03-08 02:53:57 -08:00
Tim Abbott
fe237118b0 Rename zerver/lib/session_user.py to sessions.py. 2017-03-08 02:43:35 -08:00
K.Kanakhin
1cb0f8dc41 Add size limit for uploading user avatars and realm icons.
- Add settings parameter for max realm icon size.
- Add settings parameter for max user avatar size.
- Add checking file size to avatar and icon
  uploading views.
- Transfer file size limit parameter to frontend.
- Add tests.
2017-03-07 22:13:01 -08:00
Tim Abbott
6a8dfe1f3f test_messages: Fix nondeterministic coverage issue. 2017-03-07 20:44:55 -08:00
K.Kanakhin
173f34b7aa user-presence: Add offline status to aggregated info.
- Add `OFFLINE_THRESHOLD_SECS` settings parameter
  to handle offline period.
- Set aggregated status to offline if user's status
  haven't changed for `OFFLINE_THRESHOLD_SECS` period.
- Add test for offline aggregated status.
2017-03-07 20:09:53 -08:00
K.Kanakhin
2f251dedaf user-presence: Add aggregated status to user presence info.
- Add aggregated status to user presence status dict.
- Add tests for aggregated presence status.
- Fix removing unused keys from status dict
  with aggregated data for user.

Fixes #3692
2017-03-07 20:09:53 -08:00
K.Kanakhin
6a801db1c2 missed-emails-sending: Move email sending to separate queue worker.
- Add new 'missedmessage_email_senders' queue for sending missed messages emails.
- Add the new worker to process 'missedmessage_email_senders' queue.
- Split aggregation missed messages and sending missed messages email
  to separate queue workers.
- Adapt tests for sending missed emails to the new logic.

Fixes #2607
2017-03-07 20:08:40 -08:00
Elliott Jin
3127ebfa3b test-backend: Raise zerver/views/events_register.py test coverage to 100%. 2017-03-07 19:47:16 -08:00
Umair Khan
1f60baba6b Handle social auth exception in auth_complete.
In case of an exception, we log it and return None which results in a
redirect to the login page.
2017-03-07 19:46:40 -08:00
Tim Abbott
393c4d2eaa push: Don't pass a UserProfile into _do_push_to_apns_service. 2017-03-05 18:37:00 -08:00
Tim Abbott
53c9e3b4ca push: Don't pass a full UserProfile into APNsMessage. 2017-03-05 18:37:00 -08:00
Tim Abbott
c8bfd568bc push: Pass devices list into send_apple_push_notification. 2017-03-05 18:36:58 -08:00
Tim Abbott
0ddaf5c610 push: Pass reg_ids list into send_android_push_notification.
This refactoring is preparation for being able to forward push
notifications to users on behalf of another Zulip server.

The goal is to remove access to the current server's database from the
send_*_push_notification code paths.
2017-03-05 18:36:07 -08:00
Steve Howell
419a3174f1 Send stream_id in stream/update events. 2017-03-05 15:44:42 -08:00
Steve Howell
0bb1af0fd9 Send stream_id in subscription updates. 2017-03-05 15:26:00 -08:00
Tim Abbott
b6f53d6c14 coverage: bring zerver/lib/validator.py to 100% coverage. 2017-03-05 00:53:27 -08:00
Tim Abbott
2f8bb1b1cd coverage: Add test for REST requests to /json API unauthed. 2017-03-05 00:53:27 -08:00
Tim Abbott
c8e38aaa55 coverage: Add coverage for OPTIONS HTTP method. 2017-03-05 00:53:26 -08:00
Tim Abbott
e95f139308 coverage: bring zerver/lib/response.py to 100% coverage. 2017-03-05 00:53:26 -08:00