Commit Graph

29831 Commits

Author SHA1 Message Date
Eeshan Garg 4a2a3e3640 webhooks/gitlab: Support issues with multiple assignees.
The fixtures added in this commit were generated by Adam Birds.
2018-12-27 20:15:00 -08:00
Eeshan Garg 488f558d49 test_docs: Print better error messages for failed responses. 2018-12-27 20:13:08 -08:00
Eeshan Garg 8a02e177e3 bugdown: Trigger test failure for invalid Markdown include statements.
This commit adds a custom Markdown include extension which is
identical to the original except when a macro file can't
be found, it raises a custom JsonableError exception, which
we can catch and then trigger an appropriate test failure.

Fixes: #10947
2018-12-27 20:13:08 -08:00
Abhinav Singh a378407c57 emails: Fix inconsistent email UI for different email clients.
This commit replaces hsl color codes to hex color codes to render
colors in different email clients consistently.
2018-12-27 18:02:08 -08:00
Tim Abbott c995e8e2ae import: Ensure presence of basic avatar images for HipChat.
Our HipChat conversion tool didn't properly handle basic avatar
images, resulting in only the medium-size avatar images being imported
properly.  This fixes that bug by asking the import tool to do the
thumbnailing for the basic avatar image (from the .original file) as
well as the medium avatar image.
2018-12-27 17:47:09 -08:00
Steve Howell e8f2d6f32b Fix false positives in message view tests.
The `assert_message_groups_list_equal` and
`assert_message_list_equal` helpers were
always returning `true`, as they were doing
a bogus traversal of the data structures and
always comparing empty arrays, even when there
was real data.

To prevent this pitfall in the future, we assert
that the extracted data is truth-y, and for the
empty cases we just directly assert deep equality
to `[]`.
2018-12-25 09:30:03 -08:00
Rishi Gupta 955dfc6397 billing: Remove references to Realm.has_seat_based_plan. 2018-12-24 10:27:56 -08:00
Rishi Gupta 7c38300949 billing: Add info line to logger for failed upgrades. 2018-12-24 10:27:56 -08:00
Rishi Gupta 653416ab23 billing: Update /billing to work with new subscription model. 2018-12-23 00:18:21 -08:00
Rishi Gupta e7220fd71f billing: Do subscription management in-house instead of with Stripe Billing.
This is a major rewrite of the billing system. It moves subscription
information off of stripe Subscriptions and into a local CustomerPlan
table.

To keep this manageable, it leaves several things unimplemented
(downgrading, etc), and a variety of other TODOs in the code. There are also
some known regressions, e.g. error-handling on /upgrade is broken.
2018-12-22 13:39:30 -08:00
Rishi Gupta 5633049292 billing: Restructure validation of upgrade parameters. 2018-12-22 13:30:15 -08:00
Rishi Gupta b4a28f3147 billing: Rename seat_count to licenses where appropriate. 2018-12-22 13:30:15 -08:00
Rishi Gupta 7ab1406962 billing: Prepare for moving Plan to CustomerPlan.billing_schedule. 2018-12-22 13:30:15 -08:00
Vishnu Ks 8176d112fe billing: Add frontend for license-based billing system. 2018-12-22 13:30:15 -08:00
Vishnu Ks d086efd33f billing: Deduplicate get_form_input in billing.js. 2018-12-22 13:30:15 -08:00
Rishi Gupta 7b5d15d254 billing: Move discount to local Customer object.
A lot of the seemingly unrelated test fixture changes are because we're
removing a query to stripe in the upgrade path, in cases when the user's
realm has an existing Customer object.
2018-12-22 13:30:15 -08:00
Rishi Gupta 8ec91fc42d billing: Remove process_downgrade. 2018-12-22 13:30:15 -08:00
Rishi Gupta 84a31ca800 billing: Remove BillingProcessor.
Leaving the model in place, so that we can do the database migration by
hand.
2018-12-22 13:30:15 -08:00
Steve Howell 72576b3a77 compose: Fix recent autocomplete regression.
As part of giving the stream/topic fields in the
compose box longer ids, I broke the autocomplete
code that handles re-focusing the cursor after
a user hits enter.  The worst symptom of this was
that we tried to send a message before compose
finished (although it wouldn't fully deliver the
message).

The new code should be a bit easier to grep for
if we rename these fields again, as we explicitly
use selector syntax.
2018-12-22 08:07:23 -08:00
Steve Howell ca22302763 minor: Avoid ui_util.focus_on() call.
The helper is unnecessary at this point and obscures
greps for selectors.  We completely eliminate it in
the next commit.
2018-12-22 08:07:23 -08:00
Steve Howell a3000940f7 Remove Slack/PHP link to fix builds.
The link is broken, and I'm not sure we want this
paragraph in there, as it's somewhat speculative
(we don't know how extensively Slack uses PHP any
more, nor do we know how much of a factor it is in
any security issues) and is probably mostly
preaching to the choir.  The "bounty" link should
suffice.
2018-12-22 08:07:23 -08:00
Vishnu Ks 30a61d7505 billing: Fix plan input bug in upgrade. 2018-12-21 09:34:27 -08:00
Vishnu Ks bcae08470c emails: Use ugettext instead of ugettext_lazy in signals.
ugettext_lazy was printing the object in the email template
instead of the string.
2018-12-20 19:35:23 -08:00
Rishi Gupta bf8db6f634 emails: Update text for confirm_registration. 2018-12-20 16:26:19 -08:00
Rishi Gupta 0844c9a6ec emails: Update text for password_reset.
Note that a pretty common use case for this is a realm admin sending this to
everyone after an import from HipChat or Slack. So this adds the realm_name
to the title (so that there is something they might recognize) and kept the
wording generic enough to accommodate the user not having clicked anything
to get this email.

Also strengthens the tests a bit to better test the complicated template
logic.
2018-12-20 16:26:19 -08:00
Rishi Gupta 2da0cb7a44 emails: Update text of realm_reactivation. 2018-12-20 16:26:19 -08:00
Rishi Gupta f8720fddd6 emails: Update text of notify_new_login. 2018-12-20 16:26:19 -08:00
Rishi Gupta dc39d66bca emails: Update text for notify_change_in_email. 2018-12-20 16:26:19 -08:00
Rishi Gupta fb56720054 emails: Update text for invitation and invitation_reminder. 2018-12-20 16:26:19 -08:00
Rishi Gupta d8e16143d4 emails: Clean up code surrounding the call to find_team. 2018-12-20 16:26:19 -08:00
Rishi Gupta 292683f0d5 emails: Add a few more emails to email_log.py. 2018-12-20 16:26:19 -08:00
Rishi Gupta abbe7b8f65 context_processors: Add user_name to common_context. 2018-12-20 16:26:19 -08:00
Rishi Gupta 19645354c7 user docs: Update about-streams-and-topics. 2018-12-20 16:26:19 -08:00
Steve Howell 1656fd7729 Fix recent regression with mute undo.
The undo button was bound to the stream id
and topic for only the first call, when
the click handler was set.
2018-12-20 15:58:05 -08:00
Akash Nimare bd49b2ad63 portico: Fix height of carousel container. 2018-12-20 18:49:41 +05:30
Vishnu Ks 6d29525ef0 emails: Fix broken email revert process in email_log. 2018-12-19 11:24:57 -08:00
Tim Abbott 9c3f38a564 docs: Automatically construct OpenAPI metadata for help center.
This is somewhat hacky, in that in order to do what we're doing, we
need to parse the HTML of the rendered page to extract the first
paragraph to include in the open graph description field.  But
BeautifulSoup does a good job of it.

This carries a nontrivial performance penalty for loading these pages,
but overall /help/ is a low-traffic site compared to the main app, so
it doesn't matter much.

(As a sidenote, it wouldn't be a bad idea to cache this stuff).

There's lots of things we can improve in this, largely through editing
the articles, but we can deal with that over time.

Thanks to Rishi for writing all the tests.
2018-12-19 10:18:20 -08:00
Vishnu Ks 0fb90dcdb3 emails: Tag followup_day2 email for translation. 2018-12-19 09:21:09 -08:00
Vishnu Ks f9e4d5d28e emails: Tag password_reset for translation. 2018-12-19 09:21:09 -08:00
Vishnu Ks 0960e654ab emails: Tag notify_new_login email for translation. 2018-12-19 09:21:09 -08:00
Vishnu Ks 78fea79c06 emails: Simplify new_login device info section. 2018-12-19 09:21:09 -08:00
Tim Abbott a4dccec356 linkifiers: Fix the new linkifier field widths.
This makes it much more reasonable to enter a longer URL.
2018-12-19 09:15:41 -08:00
rht acbb174100 provision: Add RHEL 7 support. 2018-12-18 17:13:56 -08:00
rht 84c968ab36 provision: Include scripts/lib/setup-* and scripts/lib/build-* for sha1 sum check. 2018-12-18 16:56:27 -08:00
Tim Abbott 0510424e1c auth: Remove some now-unused auth_backend_enabled helpers.
These were causing coverage errors, and in any case are now useless.
2018-12-18 16:51:57 -08:00
Tim Abbott af1c7a9573 docs: Improve documentation for adding a new authentication backend.
Now that we have the Azure Active Directory integration cleaned up and
merged, we can nicely link to it as an example.
2018-12-18 16:49:01 -08:00
Tim Abbott 00a75bda3b docs: Fix a few broken link anchors. 2018-12-18 16:49:01 -08:00
seresheim 49dbd85a89 auth: Add support for Azure Active Directory authentication.
This takes advantage of all of our work on making the
python-social-auth integration reusable for other authentication
backends.
2018-12-18 16:39:03 -08:00
Tim Abbott 9d058f9193 test_auth_backends: Eliminate manual lists of authentication backends.
This should dramatically reduce the manual work involved with
correctly adding a new authentication backend to Zulip with this test
suite.
2018-12-18 16:36:45 -08:00
Tim Abbott 11fcbe52a6 auth: Automate calculation of get_auth_backends_data.
This change lets us eliminate the need for new authentication backends
to edit get_auth_backends_data, since we're just computing it from the
official registry in zproject/backends.py.  Should save a few lines of
work whenever we add a new auth backend, and make that more accessible
to new contributors.
2018-12-18 16:23:21 -08:00