Commit Graph

10448 Commits

Author SHA1 Message Date
Vishnu KS 23036a9f40 confirmation: Set confirmation object realm attribute in realm reactivation.
The value of realm attribute in confirmation object used to be empty
before. We are not currently using the realm attribute of reactivation
links anywhere. The value of realm stored in content_object is currently
used.
2019-10-21 16:52:46 -07:00
Vishnu KS 139ebf387b support: Pass various realm functions as template context.
We currently have code to calculate the value of realm_icon_url,
admin_emails and default_discount in two diffrent places. With
the addition of showing confirmation links it would become three.
The easiest way to deduplicate the code and make the view cleaner
is by doing the calculations in template. Alternatively one can
write a function that takes users, realms and confirmations as
arguments and sets the value of realm_icon_url, admin_emails and
default_discount appropriately in realm object according to the
type of the confirmation. But that seems more messy than passing
the functions directly to template approach.
2019-10-21 16:52:46 -07:00
Tim Abbott b12d3d54c6 events: Fix documentation testing for /events.
Most of the failures were due to parameters that are not intended to
be used by third-party code, so the correct fix for those was the set
intentionally_undocumented=True.

Fixes #12969.
2019-10-21 16:50:10 -07:00
Tim Abbott c35472e025 test_openapi: Fix confused error messages for missing parameters.
These conditionals were backwards.
2019-10-21 16:26:08 -07:00
Tim Abbott c120ce6ecc events: Make it easy for test_openapi to find /events. 2019-10-21 16:26:00 -07:00
chgl bea9e41fbd webhooks: Add Harbor webhook integration. 2019-10-21 15:51:35 -07:00
Pragati Agrawal 857470c5ca events: Add delivery_email to user initial state data.
For admins, this adds `delivery_email` in addition to `email` for the
case when email address visibility is set to admins only.
2019-10-21 15:43:49 -07:00
Vishnu Ks 37c5f9b9c5 tests: Move add-linkifiers to correct position in exclude list. 2019-10-21 15:30:57 -07:00
Vishnu KS f2242c1487 docs: Make update-notification-settings use curl example system. 2019-10-21 17:10:35 +05:30
Mateusz Mandera bbf2474bd0 tests: setUp overrides should call super().setUp().
MigrationsTestCase is intentionally omitted from this, since migrations
tests are different in their nature and so whatever setUp()
ZulipTestCase may do in the future, MigrationsTestCase may not
necessarily want to replicate.
2019-10-19 17:27:01 -07:00
Vishnu KS 0af7aa8db3 docs: Make update-stream use curl example system.
new_name and description params should be valid JSON
strings. The format of these params are marked as
json so that the curl example genenrator can convert
them into json strings.
2019-10-18 13:45:30 -07:00
Vishnu Ks e96d96b6e4 docs: Add curl example to upload-file. 2019-10-18 13:45:30 -07:00
Vishnu Ks 9ac77a8734 docs: Make upload-custom-emoji use curl example system. 2019-10-18 13:45:30 -07:00
Mateusz Mandera 438c4b2935 tests: tearDown overrides should call super().tearDown().
ZulipTestCase subclasses that override tearDown() should call the parent
class tearDown() too, as it does some clean up of its own.
2019-10-18 13:36:59 -07:00
Mateusz Mandera 72dd834088 test_signup: Migrate ldap tests to the new format. 2019-10-17 17:10:39 -07:00
Mateusz Mandera 33050c733d test_email_notifications: Migrate ldap tests to the new format. 2019-10-17 16:49:53 -07:00
Mateusz Mandera e9df17884a test_settings: Migrate ldap tests to the new format. 2019-10-17 16:49:53 -07:00
Mateusz Mandera efba7290fd test_auth_backends: Migrate ldap tests to the new format. 2019-10-17 16:49:53 -07:00
Mateusz Mandera 8cbcf8cf45 tests: Add some logic to ZulipTestCase to prepare to migrate ldap tests. 2019-10-17 16:49:53 -07:00
Tim Abbott d364891894 ldap: Fix password prompt when configured only to populate data.
Previously, the logic for determining whether to provide an LDAP
password prompt on the registration page was incorrectly including it
if any LDAP authentication was backend enabled, even if LDAP was
configured with the populate-only backend that is not responsible for
authentication (just for filling in name and custom profile fields).

We fix this by correcting the conditional, and add a test.

There's still follow-up work to do here: We may still end up
presenting a registration form in situations where it's useless
because we got all the data from SAML + LDAP.  But that's for a future
issue.

This fixes a bug reported in #13275.
2019-10-17 14:46:46 -07:00
Rohitt Vashishtha 5fd0a121ea tests: Clean up and extend topic links tests in test_messages.
This is a follow-up to b69213808a.
We now actually send messages from the notification_bot, which
is the real usecase for this code.

Also, this cleans up the code and removes needless asserts like
`assertNotEqual(zulip_realm, lear_realm)` making the test easier
to read.
2019-10-16 17:39:09 -07:00
Vishnu Ks 1a0a282242 docs: Make delete-queue use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks f7add25cc2 docs: Make get-events-from-queue use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks 9d73578930 openapi: Fix narrow param example in /register POST endpoint. 2019-10-15 15:53:03 -07:00
Vishnu Ks 28e8df15a0 openapi: Fix fetch_event_types param example in /register POST endpoint. 2019-10-15 15:53:03 -07:00
Vishnu Ks 626c536b5e openapi: Fix event_types param example in /register POST endpoint. 2019-10-15 15:53:03 -07:00
Vishnu Ks 0b297fc092 docs: Make remove-linkifiers use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks 616502fd37 docs: Remove realm_logo and realm_night_logo from server-settings response.
They were removed in 16123c9a58
2019-10-15 15:53:03 -07:00
Vishnu Ks 6a5fdcabbd docs: Make delete-user-group use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks d1540f7e10 docs: Make update-user-group use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks c5d6be4df7 docs: Make create-user-group use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu KS 70e8f5ce8a docs: Make get-user-groups use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu KS 519b24061d docs: Update the response schema of get-presence.
The response no longer contains pushable and client keys.
2019-10-15 15:53:03 -07:00
Vishnu KS 503e65079a docs: Make get-presence use curl example system. 2019-10-15 15:53:03 -07:00
Vishnu Ks af83884f6f docs: Make create-user use curl example system. 2019-10-15 15:53:02 -07:00
Vishnu Ks ea06dc6ab3 docs: Make delete-stream use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks 13bdfc0ef8 docs: Make get-stream-topics use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu KS bd6b41cb9d tests: Remove unused variable in test_curl_examples. 2019-10-15 15:40:44 -07:00
Vishnu Ks ad16c55c77 docs: Make remove-subscriptions use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks 4364e31d69 docs: Make update-subscription-properties use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks 89d82ab827 openapi: Improve description of subscriptions in /users/me/subscriptions. 2019-10-15 15:40:44 -07:00
Vishnu Ks c35ef2d390 bugdown: Add option to include only selected fields in generate_curl_example. 2019-10-15 15:40:44 -07:00
Vishnu Ks 3f9835ed07 docs: Make mark-as-read-bulk use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks f0b099dbc0 docs: Make update-message-flags use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks 19ee518f2e docs: Make get-message-history use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks ed2e89f167 docs: Make delete-message use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks 0dccebbe39 docs: Make update-message use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu KS 9bc3594f75 docs: Make get-raw-message use curl example system. 2019-10-15 15:40:44 -07:00
Vishnu Ks cb64fc8732 bugdown: Show example value for path params in curl example. 2019-10-15 15:40:44 -07:00
Vishnu Ks a03765bbe2 bugdown: Extract out function for getting openapi example value. 2019-10-15 15:40:44 -07:00