Commit Graph

4807 Commits

Author SHA1 Message Date
Tim Abbott
1549f8773e portico: Always display org info when a server has only 1 realm.
Previously, we were incorrectly using the get_unique_open_realm
function to determine whether we're in the (common) single-realm
server case and should just display an org-info-enabled login form on
the homepage.

Now, we use a slightly different function extracted from
get_unique_open_realm that doesn't check whether the realm is
invite-only.

Fixes #4841.
2017-06-02 15:00:22 -07:00
Tim Abbott
a0ef2babab text_fixtures: Rename migration status file to have test in name.
This is preparation for making things clear as we move towards not
always rebuilding the test database in provision.
2017-06-02 13:27:34 -07:00
Tim Abbott
6d00da2b80 test_fixtures: Remove hardcoding of check_files status dir.
This is preparatory support for using this framework in provision as
well.
2017-06-02 13:27:34 -07:00
Eeshan Garg
e510c5d15a webhooks/pivotal: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
829491fde7 webhooks/papertrail: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
5d868b1612 webhooks/helloworld: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
6defd7f36e webhooks/pagerduty: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
36c5e8d11f webhooks/mention: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
ccd079b425 webhooks/solano: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
c3dda04270 webhooks/zapier: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
6e6c5c8fa6 webhooks/newrelic: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
88ed657412 webhooks/updown: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
a8e4abfb7c webhooks/teamcity: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
28a2166bd0 webhooks/transifex: Migrate docs to Markdown. 2017-06-01 22:16:12 -07:00
Eeshan Garg
624bab83a7 webhooks: Use append-topic.md for gosquared, greenhouse, hellosign. 2017-06-01 22:16:12 -07:00
Tim Abbott
1f48fa2767 invite: Fix invite_by_admins_only to be enforced in backend.
This is CVE-2017-0896.

Apparently, this setting never actually was wired up to anything other
than hiding the UI widget.

Huge thanks to Ibram Marzouk from the HackerOne community for finding
this security bug.
2017-06-01 17:24:29 -07:00
Rohitt Vashishtha
db9918f3d6 bots: Move contrib_bots to api/bots*.
This will make it convenient to include these bots in Zulip API
releases on pypi.

Fix #5009.
2017-06-01 12:31:54 -07:00
Tim Abbott
73f8653da6 test_messages: Increase time allowed for bulk send.
This fixes an occasional test flake we've been seeing recently.
2017-06-01 00:00:36 -07:00
Aditya Bansal
a0faf3364a pep8: Add compliance with rule E261 test_reactions.py. 2017-05-31 17:07:15 -07:00
Aditya Bansal
7bb669ccb4 pep8: Add compliance with rule E261 test_email_mirror.py. 2017-05-31 17:07:15 -07:00
Aditya Bansal
15ea059aad pep8: Add compliance with rule E261 makemessages.py. 2017-05-31 17:07:15 -07:00
Aditya Bansal
717e5ae393 pep8: Add compliance with rule E261 commands/create_realm.py. 2017-05-31 17:07:15 -07:00
Aditya Bansal
8680c87f56 pep8: Add compliance with rule E261 zerver/lib/push_notifications.py. 2017-05-31 17:07:15 -07:00
Umair Khan
5d794d08dd test_bulk_message_fetching: Add debug code.
This test fails on self.assertTrue(delay < 0.001 * num_ids, error_msg)
randomly. This commit adds debug code to see what the real values of
paramters are.
2017-05-31 09:27:30 -07:00
Eeshan Garg
b309c403e0 webhooks/gitlab: Support Merge Request Hook reopen event.
Fixes #4795.
2017-05-30 22:11:37 -07:00
Umair Khan
71f97b7bcb testing: Invalidate cache before counting queries.
To get accurate count of the queries, we should make sure that
caches don't come into play. If we count queries while caches are
filled, we will get a lower count. Caches are not supposed to be
persistent, so our test can also fail if cache is invalidated
during the course of the unit test.

This commit solves the problem with Stream cache. This cache comes
into play when we use `get_stream` function. If cache is valid,
we will not issue queries to Stream and Recipient table. I think
the problem was one of those rare occasions when the Stream cache
got invalidated during the course of the test, due to which query
count was increased by 2. After this commit, we intentially invalidate
the Stream cache.
2017-05-30 17:28:41 +05:00
K.Kanakhin
2434f2d96c messages: Add support for admins deleting messages.
This makes it possible for Zulip administrators to delete messages.
This is primarily intended for use in deleting early test messages,
but it can solve other problems as well.

Later we'll want to play with the permissions model for this, but for
now, the goal is just to integrate the feature.

Note that it saves the deleted messages for some time using the same
approach as Zulip's message retention policy feature.

Fixes #135.
2017-05-29 21:59:38 -07:00
Harshit Bansal
298e23b447 realm_emoji.py: Allow an user to delete an emoji uploaded by them.
If a realm is configured to allow any user to upload an emoji,
then, an emoji author must be allowed to delete an emoji uploaded
by them.
2017-05-29 20:21:25 -07:00
vaibhav
9cf9837f12 webhooks: Add outgoing webhook bot user to development database. 2017-05-29 16:01:23 -07:00
Tim Abbott
4893779001 test_events: Avoid coverage errors in LogEventsTest. 2017-05-29 15:26:33 -07:00
Maxim Averin
a4c3f571db Switch change_tos_version to use RealmAuditLog. 2017-05-29 15:24:01 -07:00
Maxim Averin
685fb16c39 Switch change_full_name to use RealmAuditLog.
This requires adding an `acting_user` parameter to the
`do_change_bot_owner` function.
2017-05-29 15:22:08 -07:00
Steve Howell
1f4e1ece3a Fix flaky time-based test.
For testing waiting period thresholds, we need to
explicitly set date_joined for Hamlet to be now.
2017-05-29 11:54:06 -06:00
Ron Shafii
8cc1f13d24 test: Add test_notify_realm_of_new_user. 2017-05-28 19:14:52 -07:00
Eeshan Garg
44ec27c122 webhooks/gosquared: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
e5484f1bf5 webhooks/ifttt: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
846e560bfd webhooks/hellosign: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
372d6a2aa6 webhooks/heroku: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
2d25b6581e webhooks/greenhouse: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
dd5ce955bd webhooks/delighted: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
074e3d7401 webhooks/crashlytics: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
14ce3a94db webhooks/codeship: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
6111b56753 webhooks/circleci: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Eeshan Garg
1c50a85601 webhooks/basecamp: Migrate docs to Markdown. 2017-05-28 18:44:00 -07:00
Ethan Estrada
91e6f00d57 Test that log_event auto creates missing log dir. 2017-05-28 18:24:00 -07:00
Ethan Estrada
a11c578d57 Test for early return when "LOG_EVENT_DIR" is None. 2017-05-28 18:21:50 -07:00
Tim Abbott
9d7e6b1b48 events: Fix race with realm_waiting_period_threshold changes.
The can_create_streams property changed some time ago to depend on 2
different properties of Realm, causing occasional test failures.
2017-05-28 18:21:50 -07:00
Reid Barton
ccb4c5c26f bots: Move zephyr-related files to api/integrations/zephyr/. 2017-05-26 15:07:02 -07:00
Sarah
bb329b4020 zerver/lib/events: Refactor using UserProfile prop_types and notifications
Refactor fetch_initial_state_data to use the UserProfile.property_types
and notifications dictionaries.
2017-05-26 14:55:54 -07:00
Nathan Miller
2311e169ec mypy: Various strict-optional fixes in zerver. 2017-05-26 10:10:20 -07:00