Commit Graph

1276 Commits

Author SHA1 Message Date
Shubham Padia bf6dc4472b models: Add is_private flag to UserMessage and add index for it.
The is_private flag is intended to be set if recipient type is
'private'(1) or 'huddle'(3), otherwise i.e if it is 'stream'(2), it
should be unset.

This commit adds a database index for the is_private flag (which we'll
need to use it). That index is used to reset the flag if it was
already set. The already set flags were due to a previous removal of
is_me_message flag for which the values were not cleared out.

For now, the is_private flag is always 0 since the really hard part of
this migration is clearing the unspecified previous state; future
commits will fully implement it actually doing something.

History: Migration rewritten significantly by tabbott to ensure it
runs in only 3 minutes on chat.zulip.org.  A key detail in making that
work was to ensure that we use the new index for the queries to find
rows to update (which currently requires the `order_by` and `limit`
clauses).
2018-07-30 15:43:55 -07:00
Tim Abbott fd71f7282d docs: Clean up the new thumbnailing docs. 2018-07-30 13:46:32 -07:00
Tim Abbott b53463d6a4 docs: Remove use of multi-line 'su zulip' in docs.
It turns out this confused people into trying to run both pieces in
one line.
2018-07-30 13:38:55 -07:00
Tim Abbott aa5959396d docs: Add some basic subsystem documentation for thumbnailing. 2018-07-30 13:20:54 -07:00
Tim Abbott 02ae71f27f api: Stop using API keys for Django->Tornado authentication.
As part of our effort to change the data model away from each user
having a single API key, we're eliminating the couple requests that
were made from Django to Tornado (as part of a /register or home
request) where we used the user's API key grabbed from the database
for authentication.

Instead, we use the (already existing) internal_notify_view
authentication mechanism, which uses the SHARED_SECRET setting for
security, for these requests, and just fetch the user object using
get_user_profile_by_id directly.

Tweaked by Yago to include the new /api/v1/events/internal endpoint in
the exempt_patterns list in test_helpers, since it's an endpoint we call
through Tornado. Also added a couple missing return type annotations.
2018-07-30 12:28:31 -07:00
Rishi Gupta 5e7fd3a3cf docs: Move server import and export from /help to readthedocs. 2018-07-27 10:37:50 -07:00
Tim Abbott 038f50b05e docs: Add basic documentation for adding mypy stubs. 2018-07-26 15:06:22 -07:00
Aditya Bansal 0042694e24 stylelint: Start using stylelint to lint our css.
Tweaked by tabbott to document it.

Fixes #8894.
2018-07-25 15:03:35 -07:00
Lyla Fischer e07bf51fc9 user docs: Update the message-actions template. 2018-07-20 10:10:17 -07:00
Lyla Fischer f3b0b8edc8 user docs: Remove the admin.md macro. 2018-07-19 22:30:51 +05:30
Tim Abbott 5371589c76 setup-advanced: Remove broken links for old tsearch_extras packages.
It appears Luke's Dropbox folder/shared link that used to host some
tsearch_extras binaries was removed.  It wasn't very high-value
regardless, because most of the platforms involved are deprecated, the
ones that don't generally have a PPA, and building from source is
pretty easy.  So, we just remove these options from the documentation.

While we're at it, make clear we only support direct installation on
Ubuntu LTS.

Fixes #9863.
2018-07-11 21:35:23 +05:30
Aditya Bansal 9b485f3ef4 auth: Fix bug with subdomains and GitHub auth causing apparent logouts.
This adds a new settings, SOCIAL_AUTH_SUBDOMAIN, which specifies which
domain should be used for GitHub auth and other python-social-auth
backends.

If one is running a single-realm Zulip server like chat.zulip.org, one
doesn't need to use this setting, but for multi-realm servers using
social auth, this fixes an annoying bug where the session cookie that
python-social-auth sets early in the auth process on the root domain
ends up masking the session cookie that would have been used to
determine a user is logged in.  The end result was that logging in
with GitHub on one domain on a multi-realm server like zulipchat.com
would appear to log you out from all the others!

We fix this by moving python-social-auth to a separate subdomain.

Fixes: #9847.
2018-07-10 16:49:00 +05:30
Shubham Dhama 7cbacdb8c2 populate_db: Integrate populate_analytics_db.
As detailed in the documentation changes, this simplifies the
development workflow for doing UI work on the /stats pages.

The cost is a ~10% increase the time it takes to run `populate_db`,
which doesn't happen very often (and for most purposes manifests as a
1% increase in the time it takes to rebuild the database from scratch).
2018-07-09 15:05:48 +05:30
Rishi Gupta 16334a1ba7 billing: Update billing system. 2018-07-09 14:33:07 +05:30
Tim Abbott ddc2ef2ce8 docs: Point Docker users to the Docker upgrade docs.
The normal instructions don't make sense for the Docker image.
2018-07-01 06:58:44 -07:00
Jack Zhang 781e995865 docs: Fix typos in mobile-push-notifications. 2018-06-30 13:48:01 -07:00
Vishnu Ks 0212113569 docs: Document ADD_TOKENS_TO_NOREPLY_ADDRESS in email.md.
Rewritten and moved by tabbott.
2018-06-23 12:03:30 -07:00
Tim Abbott 9d9d59d4b2 clean-unused-caches: Optimize performance.
This saves about 400ms when running clean-unused-caches, basically by
calling its sub-rountines by import (rather than
`subprocess.check_call()`).  The performance optimization seems well worth it.

Fixes #9766.
2018-06-18 07:31:33 -07:00
Eeshan Garg 0a43e5e257 Replace all user-facing references to "invite-only" with "private".
Fixes #9611.
2018-06-12 13:37:45 -04:00
Tim Abbott 427c43723c docs: Document disabling unattended-upgrades.
I don't think this is exactly the right place to document this, but
I'm not sure there's a better one without some restructuring this page
in general (which would probably have value).

Fixes #8769.
2018-06-05 08:45:42 -07:00
Tim Abbott 40635beb23 docs: Document production support for Debian Stretch and Ubuntu Bionic.
Fixes #9197.
2018-06-05 08:09:29 -07:00
Tim Abbott ce4f00bd84 docs: Attempt to clarify the REST API writing docs. 2018-06-04 16:01:07 -07:00
Eeshan Garg 371cacde35 docs: Add a guide on how to document REST API endpoints. 2018-06-04 15:27:49 -07:00
Tim Abbott b7af4c2162 docs: Update multiple organization docs to clarify root domain story.
Previously, we made it seem like it was a good idea to use a subdomain
and a root domain at the same time.
2018-05-31 12:18:41 -07:00
Eeshan Garg 4f98a45507 docs: Rename "webhooks" to "incoming webhooks".
I only renamed references that I thought were absolutely necessary
and only if the resulting sentence structure wasn't awkward.

If the renaming resulted in awkward structure, I replaced the term
"webhook" with "integration" (but only in some very obvious cases).

Fixes #9500.
2018-05-30 18:21:13 -07:00
Tim Abbott 8c100f45f0 docs: Update development environment docs for Ubuntu bionic.
We also clean up some flows in the documentation that were somewhat
confusing that I noticed while working on this.
2018-05-30 10:00:41 -07:00
Yashashvi Dave 07b63e4886 jquery-form: Remove jquery-form plugin dependency.
Fixes #9430.
2018-05-29 15:44:40 -07:00
Sampriti Panda 018a33ff7c send_test_email: Send email from NOREPLY address as well.
Tweaked by tabbott to also set different subject lines, to make it
easier to see that one got 2 emails.
2018-05-27 22:18:44 -07:00
Yago González 623d7e66d9 docs: Rename Swagger to OpenAPI in the dev docs' titles. 2018-05-25 14:57:44 -07:00
amanagr 7797c746fc docs: Update installation instructions for Ubuntu 18.04.
Add missing dependencies for installation of dev server in
Ubuntu 18.04.
2018-05-25 08:50:14 -07:00
Abhigyan Khaund fda786952e documentation: Migrate all CZO stream links to new stream URL style
This includes changes like changing CZO stream URLs from new.20members
to 95-new-members.
2018-05-24 15:15:34 -07:00
Tim Abbott a0e24e6d1f setup-advanced: Improve discussion of manual instructions.
First, make them even less recommended.  But also, remove the list of
packages at the top -- it's not actually useful.
2018-05-24 09:47:18 -07:00
Tim Abbott 54c91ebdc0 setup-advanced: Remove direct nodejs documentation.
We already install this via `install-node` further on.
2018-05-24 09:45:55 -07:00
amanagr 3818a0ca3d docs: Update dev server manual installation instructions.
Update instructions for setup in ubuntu 18.04.
2018-05-24 07:37:07 -07:00
Umair Khan adaeaccd20 2FA: Add link in settings to setup two-factor. 2018-05-23 15:49:41 -07:00
Tim Abbott d6fb47385b docs: Clean up the instructions for installing from Git.
This is now much more common, and deserves clearer discussion.
2018-05-23 14:34:28 -07:00
Tim Abbott e420766f70 docs: Remove a dead link from our reading list.
This might have been a useful tutorial, but python.net has been down
long enough that it's unlikely to come back.
2018-05-22 11:35:30 -07:00
Tim Abbott 31045e281c docs: Remove the nginx section of life-of-a-request tutorial.
The link was broken, but more importantly, this seemed like the wrong
level of detail about this feature.
2018-05-22 11:34:11 -07:00
Tim Abbott 9aee4c8c8e docs: Add production documentation on deployment options.
This describes the basics of installing Zulip in more complex
production environments using multiple services.

Fixes #1235.
2018-05-22 11:31:48 -07:00
Tim Abbott c6909fb99c migration_tests: Document the migration test framework. 2018-05-21 09:59:55 -07:00
Tim Abbott c0eaf7c166 docs: Update changelog since 1.8.1 release. 2018-05-20 20:53:39 -07:00
Tim Abbott f8fcbbb672 docs: Update security model docs for new stream history feature. 2018-05-20 14:38:51 -07:00
Tim Abbott 63a01d35e1 docs: Remove now-obsolete trusty64 box instructions.
This annoying Vagrant bug hasn't been super relevant for over a year.
2018-05-17 07:33:24 -07:00
Tim Abbott 958be1ebb6 docs: Clarify Vagrant version recommendations. 2018-05-17 07:30:24 -07:00
Tim Abbott 0364ba8986 docs: Recommend Mailgun over Sendgrid for email setup. 2018-05-17 07:28:08 -07:00
Tim Abbott faa2cd9597 docs: Clarify setup documentation for S3 backend. 2018-05-17 07:20:07 -07:00
Tim Abbott 0ac8de2b47 docs: Document new configuration option for production nginx. 2018-05-17 07:14:18 -07:00
Tim Abbott 0dcf873370 third: Rename thirdparty-fonts.css for better clarity.
Now it's clear that this is just legacy fontawesome styles.
2018-05-17 04:58:30 -07:00
Aman Ghebreweldi b05a702285 third: Use font awesome css file from NPM package. 2018-05-17 04:58:30 -07:00
Tim Abbott e63541e616 docs: Extract documentation for file upload backends.
This moves the documentation for this feature out of
prod_settings_template.py, so that we can edit it more easily.

We also add a bucket policy, which is part of what one would want to
use this in production.

This addresses much, but not all, of #9361.
2018-05-16 15:00:54 -07:00