Commit Graph

29402 Commits

Author SHA1 Message Date
rht a1ca8c262a setup-apt-repo: Add `set -e` and ensure the sources file exists. 2018-12-07 14:00:59 -08:00
rht a1ff44a230 refactor: Add a helper function to create s3 buckets.
This refactor makes upgrading boto to boto3 easier.
Based on 43d2f6286c
2018-12-07 13:58:11 -08:00
Tim Abbott b218c2a70e loadbalancer: Use same certbot cert for zulipstaging.com.
This is a simple configuration improvement.
2018-12-07 13:43:21 -08:00
Tim Abbott 467694c1fa nginx: Enable http2 in external nginx configuration.
This should be a nice performance improvement for browsers that
support it.

We can't yet enabled this in the Zulip on-premise nginx configuration,
because that still has to support Trusty.
2018-12-07 13:43:02 -08:00
Tim Abbott b2939cdf19 lint: Fix comma spacing in node tests.
I apparently failed to check the tests codebase before merging the
last linter commit.  Oops.
2018-12-07 13:14:28 -08:00
Tim Abbott 838dd6d273 lint: Add eslint enforcement for comma-spacing.
We've been enforcing this manually for a long time, and hadn't
realized it was missing from our eslint configuration.
2018-12-07 12:22:24 -08:00
Tim Abbott 46d0ecdfe8 css: Organization account-settings specific CSS.
This puts most of our account-settings specific CSS into a single
block for better readability.
2018-12-07 12:07:34 -08:00
Akash Nimare e827e36429 settings: Show current user's role in Your Account.
This makes it easier to figure out what's going on if you're a guest.

Fixes: #10969.
2018-12-07 12:07:12 -08:00
Steve Howell 78e20c82a8 settings: Handle back button within settings/orgs panels.
The Casper code that I eliminated here seems to be
bogus, in that I don't think it really waited for
all the clicks.

I **think** the intent of the test was to verify that
when you leave settings and go back into it, it remembers
the panel.  I was able to verify this manually.
2018-12-07 11:45:25 -08:00
Steve Howell 3544688b35 settings: Call replaceState() when entering settings/orgs.
We have an upcoming change that lets us use the
back button after going arrowing through multiple
settings pages.

Without first adding this commit, we would have an
infinite loop when you came back to '#settings' and
then '#settings' would rewrite the url with the current
hash.

Just replacing the browser state allows the browser
to do the right thing.

The history protocol is pretty well supported:

    https://caniuse.com/#search=history
2018-12-07 11:45:23 -08:00
Steve Howell 2a1a55af8a settings: Streamline how we launch settings.
We can eliminate the janky `setup_page` methods
and just pass in section from `hashchanged`.

This sets us up to handle browser history more
nicely when you load '#settings' and we could essentially
redirect you to '#settings/your-account' (or similar
things).  A future commit will address that.

We also use `launch` as the new entry point, which
is more consistent with other modules.
2018-12-07 11:40:56 -08:00
Steve Howell 5a4a357afc cosmetic: Use early-return instead of else/if. 2018-12-07 11:40:56 -08:00
Steve Howell 3acc6fe080 settings: Extract admin.build_page(). 2018-12-07 11:40:54 -08:00
Steve Howell b9aecabdb7 settings: Extract settings.build_page(). 2018-12-07 11:40:50 -08:00
Steve Howell fcf31cedbc settings: Extract gear_menu.update_org_settings_menu_item().
The prior name of this was a bit inaccurate, as we no
longer ever hide the menu item for non-admins.  Also,
it belongs more naturally in `gear_menu.js` at this point.

Also, we remove one call to this, which was in a place
where it was no longer necessary.
2018-12-07 11:40:40 -08:00
Steve Howell 1d07d0a532 settings: Extract admin_sections.maybe_disable_widgets().
We now run the code to disable widgets every time
we reload a section, which was the original intention
of the code, but the call to it only happened when
you first launched the page.

We also continue to run this logic for live updates
of is_admin, although it's worth noting that the
code still only handles the "demotion" case of going
from admin to non-admin. (If somebody makes you an
admin, you continue to need to reload to get
widgets enabled.)
2018-12-07 11:40:37 -08:00
rht a0dbcde063 export_files_from_s3: Move saving s3 object to local file to a separate function.
This refactor makes upgrading boto to boto3 easier.
Based on 24bf813e8a
2018-12-07 11:37:46 -08:00
rht 0ddb242583 export_files_from_s3: get s3 object info in dict to a separate function.
This refactor makes upgrading boto to boto3 easier.
Based on 24bf813e8a
2018-12-07 11:37:46 -08:00
rht 1cecf0f142 export_files_from_s3: Move checking for s3 oject's metadata to a separate function.
This refactor makes upgrading boto to boto3 easier.
Based on 24bf813e8a
2018-12-07 11:37:46 -08:00
Akash Nimare 1dc741b963 help: Fix left sidebar content in smaller window.
This fixes an issue where some of the content of left
sidebar gets visible even in smaller window which looks ugly.

Fixes: #10898.
2018-12-07 08:20:45 -08:00
Steve Howell b5645848d6 minor: Move line of code to set default language.
There was no reason for this code to be separated
from similar lines of code.
2018-12-07 08:04:09 -08:00
Steve Howell ead356971c hashchange: Pass in a "section" to subs.change_state.
We also eliminate get_hash_components() and clean up the
code a bit in change_state().
2018-12-07 08:03:55 -08:00
Steve Howell a2fd901bec hashchange: Add hash_util.get_hash_section().
We'll use this mostly for streams/settings URLs at first.
2018-12-07 08:03:41 -08:00
Steve Howell 7cbf031f18 hashchange: Add warning if pushState is not available. 2018-12-07 08:03:39 -08:00
Steve Howell 0914037bed hashchange: Extract get_full_url(). 2018-12-07 08:03:29 -08:00
Steve Howell ef77496897 hashchange: Use '#streams/subscribed' from the gear menu.
If you go to "Manage streams" in the gear menu,
it's now a direct link to '#streams/subscribed'
instead of just '#streams'.  This makes our
back button behavior more predictable.
2018-12-07 08:03:24 -08:00
Steve Howell a39c7096c0 hashchange: Use overlays.close_active() in a few places.
The `change_tab_to` calls are a relic of very
early versions of Zulip.
2018-12-07 08:03:20 -08:00
Steve Howell 6d22634e56 streams: Remove subs.show_and_focus_on_narrow().
We stopped calling this in this commit:

    3d77aa49db

We also remove its helper function and the obsolete
event that only it was looking for.
2018-12-07 08:03:14 -08:00
Steve Howell 75bdd2c62c hashchange: Remove unreachable code for drafts.
I missed this in an earlier commit where I swept
the overlays for unreachable code.
2018-12-07 07:39:51 -08:00
Joshua Pan bc74abae41 user_events: Create delivery_email update event procedure.
This ensures the "account settings" UI for managing a user's own email
address uses the delivery email, since that's what users care most about.

Eventually, we'll need to add support for at least viewing both email
addresses in "account settings", but this is the right long-term
behavior.
2018-12-06 20:09:57 -08:00
Joshua Pan 441dca0eaf email: Support delivery email in email change system. 2018-12-06 17:43:26 -08:00
Tim Abbott 5c2e7a169f test_events: Use a better assertion when comparing event count. 2018-12-06 17:43:26 -08:00
Tim Abbott 7e6f30caab actions: Extract send_user_email_update_event.
This will make it easy for us to reuse this event-sending logic for
the email_address_visibility change code path.
2018-12-06 16:26:46 -08:00
Tim Abbott e603237010 email: Convert accounts code to use delivery_email.
A key part of this is the new helper, get_user_by_delivery_email.  Its
verbose name is important for clarity; it should help avoid blind
copy-pasting of get_user (which we'll also want to rename).
Unfortunately, it requires detailed understanding of the context to
figure out which one to use; each is used in about half of call sites.

Another important note is that this PR doesn't migrate get_user calls
in the tests except where not doing so would cause the tests to fail.
This probably deserves a follow-up refactor to avoid bugs here.
2018-12-06 16:21:38 -08:00
Joshua Pan 67f0b1bbca admin: Add UI for editing realm_email_address_visibility.
This new setting is still hidden in the UI when not in the development
environment, because the feature isn't ready for production, but
merging this will help simplify future work on the feature.
2018-12-06 16:01:09 -08:00
Tim Abbott 9d32857c37 realm: Add new Realm.email_address_visibility field.
This is preparatory work for settings controlling who can see user
emails; it includes the API-level support for editing it, but no code
to actually enforce the policy.
2018-12-06 15:56:30 -08:00
Tim Abbott 7ddcbd0d3a analytics: Set delivery_email in hacky test user creation code. 2018-12-06 15:33:28 -08:00
Tim Abbott b3a4b78c6d puppet: Pass zulip scripts path as a FACTER to puppet.
This makes it possible for the Puppet codebase to access the path to
the relevant /home/zulip/deployments type directory that puppet was
run from, which in turn makes it possible to safely call scripts from
here.

Based on work by Rein Zustand.
2018-12-06 11:38:55 -08:00
Tim Abbott 978b37379b team: Relabel Greg Price as mobile.
Since that's what he does these days.
2018-12-06 11:34:51 -08:00
Akash Nimare 1b18f8b896 team: Update list of core team members.
This removes Brock from the team section.
2018-12-06 11:34:51 -08:00
Akash Nimare 3bcb524d33 team: Add Desktop app team member to core team. 2018-12-06 11:34:51 -08:00
Rishi Gupta 82ee496efc webhooks/stripe: Update fixture for customer_subscription_created. 2018-12-06 11:29:16 -08:00
Rishi Gupta 76aebac568 webhooks/stripe: Format timestamps as dates. 2018-12-06 11:29:16 -08:00
Rishi Gupta 027d5e90c5 webhooks/stripe: Update how we handle updated events.
Also more explicitly ignores the Stripe Connect related events in the
'account' category.
2018-12-06 11:29:16 -08:00
Rishi Gupta 5fb683e788 webhooks/stripe: Use exceptions instead of json_success to exit main body. 2018-12-06 11:29:16 -08:00
Tim Abbott 9e48b2f17f provision: Update comment for why we need puppet in development.
This should help avoid confusion like #10972.
2018-12-06 11:13:04 -08:00
Tim Abbott fc1c146d31 export: Remove assertion on current working directory.
This command hasn't made deep assumptions about CWD for a long time,
and this enables users to run it through a symlink (etc.).

Fixes #10961.
2018-12-06 11:05:40 -08:00
Tim Abbott 15e0304d95 settings: Compute STATIC_ROOT using absolute paths.
This makes it possible to use absolute paths to commands in a
development environment.
2018-12-06 11:05:40 -08:00
Tim Abbott be0604dcf0 left sidebar: Show recipients in "private messages" hover.
When the list of recipients of a group private message conversation is
truncated due to being long in the "Private messages" area, we didn't
provide easy access to the full list of people.  Fix this by adding a
title attribute for the area.

Fixes #10978.
2018-12-06 10:23:10 -08:00
Tim Abbott 9da4b58c8e docs: Fix /help/ sidebar being accidentally missing.
Apparently, we didn't have a test for this, and it was broken in a
recent refactoring.
2018-12-06 10:13:51 -08:00