Commit Graph

36040 Commits

Author SHA1 Message Date
Cyril Cohen 0d6f80059b
gitter import: Subscribe every user to every stream. 2020-05-05 21:31:35 -07:00
Alex Vandiver 3a7a032ee2
docs: Remove unnecessary double-backticks in indented line.
These came in during the conversion from rST in 337155f280.
2020-05-05 21:28:00 -07:00
Tim Abbott 50ed031f8e test_docs: Update a string for verifying docs. 2020-05-05 17:26:22 -07:00
Tim Abbott 5ea942caff api docs: Improve a few common OpenAPI descriptions.
This fixes a few regressions of documentation introduced earlier in
this branch.
2020-05-05 17:11:14 -07:00
shubhamgupta2956 57c38f1c79 api_docs: Add "EmojiCode" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "emoji_code" in components.
2020-05-05 17:02:56 -07:00
shubhamgupta2956 08314e3bf4 api_docs: Add "ReactionType" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "reaction_type" in components.
2020-05-05 17:02:56 -07:00
shubhamgupta2956 db3d95fd16 api_docs: Add "Principals" component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "principals" in components.
2020-05-05 17:02:56 -07:00
shubhamgupta2956 c4ebe98bba api_docs: Add IncludeCustomProfileFields component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "include_custom_profile_fields" in
components.
2020-05-05 17:02:53 -07:00
shubhamgupta2956 c28ccacb73 api_docs: Add "EmojiName" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "emoji_name" in components.
2020-05-05 17:02:53 -07:00
shubhamgupta2956 64ef886eb9 api_docs: Add "IncludeSubscribers" component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "IncludeSubscribers" in components.
2020-05-05 17:02:53 -07:00
shubhamgupta2956 597269c43e api_docs: Add HistoryPublicToSubscribers component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "history_public_to_subscribers" in
components.
2020-05-05 17:02:51 -07:00
shubhamgupta2956 c5bef400bb api_docs: Add "StreamPostPolicy" component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "stream_post_policy" in components.
2020-05-05 16:48:33 -07:00
shubhamgupta2956 b0c7daf7e5 api_docs: Add "UserId" common component.
To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "user_id" in components.
2020-05-05 16:48:33 -07:00
shubhamgupta2956 83f7241606 css: Use SCSS nesting for 'ul.filters'. 2020-05-05 16:47:59 -07:00
shubhamgupta2956 2487d834c7 css: Reorder "ul.filters" in left-sidebar.scss. 2020-05-05 16:47:59 -07:00
shubhamgupta2956 70a12cc458 css: Use SCSS nesting for chevron's styling.
Using SCSS nesting, refactor and merge various chevron's styling
elements(".all-messages-arrow", ".starred-messages-sidebar-arrow",
".stream-sidebar-arrow" and ".topic-sidebar-arrow") in
left-sidebar.scss.
2020-05-05 16:47:59 -07:00
shubhamgupta2956 063d47371c css: Reorder chevron styling in left-sidebar.scss. 2020-05-05 16:47:59 -07:00
Aman Agrawal a4495dbc6b populate_db: Generate topics using config fixture.
Instread of using stream_name + Intergers as topics, we now
generate topics using pos in `config.generate_data.json`.

This helps us create and test more realistic topics.
2020-05-05 16:11:09 -07:00
Aman Agrawal 28375e82c5 generate_test_data: Remove unused get_stream_title function. 2020-05-05 16:11:09 -07:00
Tim Abbott 6fa74c7ab2 help: Document we just use email for billing. 2020-05-05 16:02:29 -07:00
Tim Abbott 1c1c47b94a docs: Delete discussion of legacy push notifications signup.
This hasn't been used in months; it was only there in case of problems
with the rollout of the automated workflow, so it makes sense to
delete it now.
2020-05-05 15:59:35 -07:00
Vishnu Ks 9a8d0ca9fe docs: Recommend contact page over email wherever possible.
With a few tweaks from tabbott to preserve the enthusiasm for feedback
and de-emphasize twitter as a channel (we give better support
elsewhere).
2020-05-05 15:57:54 -07:00
Rohitt Vashishtha d5576217fe typeaheads: Show tip text for silent mentions.
This addition is prompted by the feedback and discussion at
https://chat.zulip.org/#narrow/stream/137-feedback/topic/silent.20mention.
2020-05-05 15:20:06 -07:00
Mateusz Mandera 4643e48f60 retention: Add a daily cron job.
This will run archive_messages management command at 6am every day, 1
hour after soft_deactivate_users (which runs at 5am).
2020-05-05 10:11:38 -07:00
Tim Abbott b9098a42d4 messages: Allow moving a topic to another stream.
This completes the implementation of support for moving a topic to
another stream by adding a basic UI for it.

Fixes #6427, which was previously the most-upvoted issue request in
Zulip.

There are likely to be a bunch of follow-up UI improvements on top of
this change to fully flesh out the feature.
2020-05-04 10:03:03 -07:00
Aman Agrawal 8e0f0d2096 populate_db: Evenly distribute messages across all streams.
Populate db with messages after non-Shakespeare streams
are created so that we can distribute messages across them too.
2020-05-04 09:41:31 -07:00
Aman Agrawal b25f2ed5b3 populate_db: Add option to specify max no of topics to create.
This will help us create more topics per stream than we currently do
by default.
2020-05-04 09:41:31 -07:00
Tim Abbott 87ddd73dcb help: Add article for how to get support.
This page isn't polished properly and I'm not sure it's the best
decision tree here, but it's definitely better to have this page than
not, and we can always adjust forward.

Fixes #10033.
2020-05-04 09:38:36 -07:00
Anders Kaseorg b501d04f6a semgrep: Lint against common SQL injection patterns.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:35:30 -07:00
Anders Kaseorg 36d50cc465 test_fixtures: Use cursor.execute correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:35:30 -07:00
Anders Kaseorg a9651e3e43 import_realm: Use cursor.execute correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:35:30 -07:00
Anders Kaseorg fd65511fe9 retention: Improve move_rows escaping correctness with psycopg2.sql.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:35:30 -07:00
Anders Kaseorg ffe5402c49 migrate: Improve do_batch_update escaping correctness with psycopg2.sql.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:33:03 -07:00
Anders Kaseorg cebac3f35a db: Fix types to accept psycopg2.sql.Composable queries, avoid Any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:33:03 -07:00
Anders Kaseorg d0b40cd7a3 test_runner: Remove _destroy_test_db monkey patch.
This was fixed upstream in Django 1.11.

https://code.djangoproject.com/ticket/27690

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:33:03 -07:00
Anders Kaseorg b405780561 do_delete_messages_by_sender: Add missing list conversion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-04 09:33:03 -07:00
Tim Abbott f4489c381c docs: Document message retention policies.
We've completed the production performance testing that had been
blocking us from advertising this feature, so we're declaring the
feature implemented by documenting it.

As of this commit, you need to edit fields using `manage.py shell` to
configure it and manually configure the cron job, but those should be
addressed in the next few days.

Fixes #106.
2020-05-03 23:52:04 -07:00
Tim Abbott d0ffba96d9 webpack: Use cacheLoader for handlebars files.
This seems to save about 1s for run-dev.py startup time.
2020-05-03 11:03:04 -07:00
Tim Abbott af5ba9bf36 webpack: Use cacheLoader for JS files.
This seems to save over 50% of the webpack startup time in run-dev.py.
2020-05-03 11:03:04 -07:00
Tim Abbott 341787a5e0 retention: Use logging API in a more standard way. 2020-05-03 10:57:23 -07:00
Mateusz Mandera 0d7cbc71dd retention: Make logging less unnecessarily verbose.
For realms with no retention policy on themselves or any of their
streams, no archiving happens, but 3 lines of logs would be generated.
That's redundant and we make changes in this commit to avoid logging
those lines if nothing of interest is happening.
2020-05-03 19:24:00 +02:00
Tim Abbott 4034f6f99e nagios: Fix check_postgres_replication_lag.
This expects to be run outside a virtualenv and thus without
typing_extensions available.
2020-05-03 00:14:54 -07:00
Anders Kaseorg 7271fb68aa logging: Pass format arguments to unconventionally-named loggers too.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-05-02 16:37:07 -07:00
Hashir Sarwar 55a8e7dff2 settings: Offer hiding presence info from other users.
For privacy-minded folks who don't want to leak the
information of whether they're online, this adds an
option to disable sending presence updates to other
users.

The new settings lies in the "Other notification
settings" section of the "Notification settings"
page, under a "Presence" subheading.

Closes #14798.
2020-05-02 15:09:05 -07:00
Tim Abbott 3eaa71cef8 test_auth_backends: Add documentation for the main test interface. 2020-05-02 14:41:21 -07:00
Dinesh a3329f288c auth: Modify `filter_usable_emails` to only exclude noreply github emails.
Instead of having to filter `@noreply.github.com` emails in
`get_unverified_emails`, it's good to make `filter_usable_emails`
just filter `@noreply.github.com` and handle verified/unverified
part in their respective functions because of `@noreply.github.com`
exception being a fiddly special-case detail.
Also renamed `filter_usable_emails` to `get_usable_email_objects`
as a line that gets all associated github emails is removed in
`get_verified_emails` and `get_unverified_emails` and added to
`filter_usable_emails`. The name `filter_usable_emails` suggests
that it just filters given emails, whereas here it's getting all
associated email objects and returning usable emails.
2020-05-02 14:30:31 -07:00
Dinesh 5c1fe776c3 auth: Extend the template for "choose email" in GitHub auth flow.
This commit extends the template for "choose email" to mention for
users who have unverified emails that they need to verify them before
using them for Zulip authentication.

Also modified `social_auth_test_finish` to assert if all emails
are present in "choose email" screen as we need unverified emails
to be shown to user and verified emails to login/signup.

Fixes #12638 as this was the last task for that issue.
2020-05-02 14:30:31 -07:00
Dinesh 4a07a6def7 auth: Separate code to get all emails from `get_verified_emails`.
This separates the part of code that gets all the emails associated
to GitHub from `get_verified_emails` in `GitHubAuthBackend`.
Improves readability of code and acts as a preparatory commit for
extending the template for "choose email" in GitHub auth flow to also
list any unverified emails that have an associated Zulip account in
the organization.
2020-05-02 13:40:57 -07:00
Mateusz Mandera 5f15af2382 tests: Clean out unnecessary ifs from GitHubAuthBackendTest helper.
After the refactor moving this logic into a helper inside of
GitHubAuthBackendTest, these checks became unnecessary and always True.
2020-05-02 13:40:29 -07:00
Dinesh 9f3872d2b4 tests: Refactor `social_auth_test`.
As "choose email" screen is only used for GitHub auth, the part
that deals with it is separated from `social_auth_test` and
dealt in a new function `social_auth_finish`. This new
`social_auth_finish` contains only the code that deals with
authentication backends that do not have "choose email" screen.
But it is overidden in GitHub test class to handle the
"choose email" screen.
It was refactored because `expect_choose_email_screen` blocks
were confusing while figuring out how tests work on non GitHub
auths.
2020-05-02 13:40:29 -07:00