Commit Graph

47518 Commits

Author SHA1 Message Date
Biki-das 64ec62b15c portico: Fixed responsive of integration request buttons.
Previously, these buttons looked broken in mobile size screens.

Fixes #20799.
2022-03-21 16:44:06 -07:00
Aman Agrawal 61cf9d1843 compose: Minor realignment of compose icons. 2022-03-21 16:41:18 -07:00
Alex Vandiver e2f4b284db docs: Remove teleport from example list of services.
This is not expected on generic Zulip servers.
2022-03-21 16:33:28 -07:00
Alex Vandiver f39ee5a16c docs: Remove references to supervisorctl (re)start all. 2022-03-21 16:33:28 -07:00
Alex Vandiver a4d0f03319 scripts: Switch to stop-server/restart-server.
stop-server and restart-server address all services which talk to the
database, and are thus more correct than restarting or stopping
everything in supervisor.

This is possible now that the previous commit ensures that the zulip
user can read the zulip installation directory during
`create-database`; previously, that directory was still owned by root
when `create-database` was run, whereas now it is in
`~zulip/deployments/`.
2022-03-21 16:33:28 -07:00
Alex Vandiver c0cc98c6a8 install: Re-order final steps.
Move database creation to immediately before database initialization;
this means it happens in a directory readable by the `zulip` user, as
well as placing it alongside similar operations.  It removes the check
for the `zulip::postgresql_common` Puppet class; instead it keeps the
check for `--no-init-db`, and switches to require
`zulip::app_frontend_base`.  This is a behavior change for any install
of `zulip::postgresql_common`-only classes, but that is not a common
form -- and such installs likely already pass `--no-init-db` because
they are warm spare replicas.

As a result, all non-`zulip::app_frontend_base` installs now skip
database initialization, even without `--no-init-db`.  This is clearly
correct for, e.g. Redis-only hosts, and makes clearer that the
frontend, not the database host, is responsible for database
initialization.
2022-03-21 16:33:28 -07:00
Alex Vandiver 394f1eadde setup: Rename postgresql-init-db to create-database.
The old name was confusingly similar to initialize-database.
2022-03-21 16:33:28 -07:00
Alex Vandiver 086c0328bd docs: Be explicit about how to skip database creation. 2022-03-21 16:33:28 -07:00
Lauryn Menard b70b925716 help_docs: Update `reading-strategies` for changed icon.
Removes reference to icon (previously a magnifying glass) in
text for filtering streams and replaces it with direction
for clicking on the STREAMS header in the left sidebar.
2022-03-21 16:14:07 -07:00
Lauryn Menard ca395227b2 help_docs: Update `mute-a-stream` for menu option text.
Corrects text in instructions for the menu option when
muting and unmuting streams.
2022-03-21 16:12:58 -07:00
Lauryn Menard ddab1d9b07 help_docs: Update `mobile-notifications` to use 'toggle'.
We'd like to use 'toggle' for consistency when referring to
check boxes in the help center documentation.
2022-03-21 16:12:20 -07:00
Lauryn Menard 210268f264 help_docs: Update `manage-inactive-streams` for settings header.
Correct out of date section header in display settings.
2022-03-21 16:12:20 -07:00
Lauryn Menard 1b1c479333 help_docs: Update `invite-new-users` for dropdown option.
Corrects an out of date dropdown option in organizational
settings for enabling email sign-up.
2022-03-21 16:12:20 -07:00
Lauryn Menard 517b2a5e10 help_docs: Update `email-notifications` for setting header.
Updates out of date reference to a Notifications setting header,
and also updates instructions for a check box to use 'toggle'.
2022-03-21 16:12:19 -07:00
Lauryn Menard 4f735aeb0e help_docs: Update `configure-default-view` to use 'toggle'.
We'd like to use 'toggle' for consistency when referring to
check boxes in help center documentation instructions.
2022-03-21 16:11:42 -07:00
Alex Vandiver a2c8be9cd5 puppet: Increase download timeout from 5m to 10m.
The default timeout for `exec` commands in Puppet is 5 minutes[1].  On
slow connections, this may not be sufficient to download larger
downloads, such as the ~135MB golang tarball.

Increase the timeout to 10 minutes; this is a minimum download speed
of is ~225kB/s.

Fixes #21449.

[1]: https://puppet.com/docs/puppet/5.5/types/exec.html#exec-attribute-timeout
2022-03-21 15:47:04 -07:00
Austin Riba 0943b38300 lightbox: Add tippy tooltip to lightbox title.
This commit adds a tippy tooltip to the lightbox title which enables the
user to view the filename of an image if the filename is different than
the image title.

Fixes: #21333
2022-03-21 15:36:10 -07:00
Austin Riba 3df0cacd9e messages: Show tippy tooltip for inline images.
This commit adds a tippy tooltip for inline image previews in messages.

There exists some (reasonable) logic in `static/js/util.js` which
overrides all title attributes for links to user-uploaded content to
ensure they always display "Download <filename>". This doesn't make
sense for inline images specifically because they will be opened in a
ligthbox, so we prevent that.

There is an additional tippy instance created in `static/js/tippyjs.js`
to add tippy tooltips to inline images, which takes advantage of the now
preserved title attribute of the parent link.
2022-03-21 15:36:10 -07:00
Lauryn Menard 6063d063b7 narrow: Add message edit history check for near links.
If realm has edit history enabled, adds a check of message
edit history before rewriting operators.
2022-03-21 13:32:11 -07:00
Lauryn Menard 0844a80d66 edit_history: Check edit history for stream and topic match.
Creates a helper function in `message_edit.js` that loops over
a message's edit history to see if a stream and topic pair
existed at some point in the message history.

Exports `util.lower_same` function to use for comparing
edit history topics as lowercase.

Also adds test for new function in `mesage_edit` node tests.
2022-03-21 13:32:11 -07:00
Aman Agrawal f0c680e9c0 narrow: narrow: Make near links work on topic / stream change.
We check if stream and topic present in the URL match that of
the message in its current state. If message is not available locally,
we fetch it before rendering the narrow.

Fixes #15290.
2022-03-21 13:32:11 -07:00
Tim Abbott 86dacee91e narrow: Reorder early startup logic in narrow.activate.
This is important preparation for a recursive call we will be adding
to the function.
2022-03-21 13:32:11 -07:00
Ganesh Pawar b7edd5df2f settings: Place the saving indicator in the header.
Fixes #21441.
2022-03-21 13:30:38 -07:00
Aman Agrawal 7a25a80242 message_edit: Move muted status of the topic when moved between streams.
Add support for moving MutedTopic entries to another stream where
the user has access to shared history in both streams and
`propagate_mode != "change_one"`.

Also, we delete them the current user does not have access to the
target stream.
2022-03-21 12:42:39 -07:00
Lauryn Menard 1b3e003b53 help_docs: Update `stream-sending-policy` help doc.
Uses new `select-stream-view-general.md` for instructions.

Also, clarifies location of button/icon as well as the
header for the privacy setting in the update modal.

Finally, updates save instruction to use `save-changes.md`.
2022-03-21 12:26:03 -07:00
Lauryn Menard 7c60ff384d help_docs: Update `change-the-privacy-of-a-stream` help doc.
Uses new `select-stream-view-general.md` for instructions.

Also, updates description to include web-public streams with link
to documentation about them, and clarifies location of button/icon
as well as the header for the privacy setting in the update modal.

Finally, updates save instruction to use `save-changes.md` and
renumbers instructions list to only use '1'.
2022-03-21 12:26:03 -07:00
Lauryn Menard 27d669ab62 help_docs: Update `stream-notifications` help doc.
Uses new `select-stream-view-personal` for instructions.

Also, moves one sentence notes to be under header vs tab block,
and updates numbers used in instruction list to all be '1',
and clarifies text about notifications table in general personal
setting.
2022-03-21 12:26:03 -07:00
Lauryn Menard 78af84f6a1 help_docs: Update `message-retention-policy` help doc.
Uses new `select-stream-view-general.md` for instructions.

Also, updates the text for locating the button/icon.
2022-03-21 12:26:03 -07:00
Lauryn Menard 3989bfe1ff help_docs: Update `rename-a-stream` help doc.
Uses new `select-stream-view-general.md` for instructions.

Also, updates text for locating the button/icon and uses
the `save-changes.md` to correct the final instruction/step.
2022-03-21 12:26:03 -07:00
Lauryn Menard b925c2f3de help_docs: Update `message-a-stream-by-email` help doc.
Uses new `select-stream-view-general.md` for instructions.
2022-03-21 12:26:03 -07:00
Lauryn Menard 7d2abdf56a help_doc: Update `change-the-color-of-a-stream` help doc.
Uses new `select-stream-view-personal.md` for instructions.

Also, clarifies location of setting (header).
2022-03-21 12:26:03 -07:00
Lauryn Menard f0409517b3 help_docs: Update `pin-a-stream` help doc.
Uses new `select-stream-view-personal.md` for instructions.

Also, clarifies where the checkbox is located (header) and
updates instruction to use 'toggle' vs 'click' for checkbox.
2022-03-21 12:26:03 -07:00
Lauryn Menard 2e69b66fec help_docs: Update `change-the-stream-description` help doc.
Uses new `select-stream-view-general.md` in instructions.

Also, moves admin warning to top of the article and updates
description text for clarity (instead of 'apps', specify
which apps have the description in the stream view).
2022-03-21 12:26:03 -07:00
Lauryn Menard f46b231c0c help_docs: Update `add-or-remove-users-from-a-stream` help doc.
Uses new `select-stream-view-subscribers.md` in instructions.

Also, adds a tip to bulk add users to a stream.
2022-03-21 12:26:03 -07:00
Lauryn Menard 9f843b924a help_docs: Add markdown helpers for stream view tabs.
Adds three markdown documents in to be used for help center
articles that have instructions that refer to actions in
the 3 new tabs in the 'Subscribed/All streams' view:

- General: stream name, description and permissions changes.
- Personal: personal stream settings, such as color, changes.
- Subscribers: adding or removing users from streams.
2022-03-21 12:26:03 -07:00
Tim Abbott 4da2f154e0 create_user: Improve --help output.
This includes documenting this as not the primary way to
programatically create users in Zulip.
2022-03-21 12:05:59 -07:00
Tim Abbott aebd81c440 management: Remove unnecessary default=SUPPRESS logic. 2022-03-21 12:05:59 -07:00
Tim Abbott 2328a81f55 devtools: Remove development-only user creation management commands.
We now have nicer version available not only to developers, and it's
definitely better to deduplicate these.
2022-03-21 12:05:59 -07:00
Tim Abbott e16043547b management: Add new create_realm management command.
This is intended for rare situations where one is creating multiple
realms via a script.

After all the preparatory refactoring in this last several commits, we
can now provide a working implementation of a create_realm management
command.
2022-03-21 12:05:59 -07:00
Tim Abbott 2be2393d3e create_user: Extract get_create_user_params.
We set nocoverage for the new function. Ideally it'd eventually get an
automated test, but we don't want to block this helpful refactoring on
doing so.
2022-03-21 12:05:59 -07:00
Tim Abbott be6ab93b37 create_user: Rename pw => password for readability. 2022-03-21 12:05:59 -07:00
Tim Abbott 2bc1cd6ab4 create_user: Fix overly large try/except block.
Only the do_create_user call can throw IntegrityError, and it's a lot
more readable to thus scope the try/except where it belongs.
2022-03-21 12:05:59 -07:00
Tim Abbott ed3569a470 create_user: Simplify parameter processing.
We remove a bit of error handling for cases where someone provided
only one of the email and full name parameters, with the benefit of
this being a lot cleaner.
2022-03-21 12:05:59 -07:00
Tim Abbott 279b99ab23 create_user: Fix unnecessary nesting of input logic. 2022-03-21 12:05:59 -07:00
Tim Abbott 57fa62ae4b initial_password: Add explicit development environment assertion.
The construction of INITIAL_PASSWORD_SALT is such that it should only
be set in development environments, but we should enforce this rule.
2022-03-21 12:05:59 -07:00
Tim Abbott 5393ce11c7 management: Clean up create_user password logic.
* Assert that we're in a development environment when appropriate.
* Add useful logging messages, including print_initial_password details.
2022-03-21 12:05:59 -07:00
Tim Abbott 6b00c748fd onboarding: Deduplicate realm creation initial user logic.
We now call this function inside do_create_user(...,
realm_creation=True), which generally improves readability and
robustness of the codebase.

This fixes a bug where this onboarding content was not correctly done
when creating a realm via LDAP, and also will be important as we add
new code paths that might let you create a realm.
2022-03-21 12:05:59 -07:00
Tim Abbott a117b224a7 onboarding: Refactor setup_realm_internal_bots call.
This improves robustness of any code paths calling do_create_realm,
which previously needed to call this correctly to achieve the same
results as creating a user via the UI.

This also fixes a bug where this code was not called if a realm were
created using the LDAP code path.
2022-03-21 12:05:59 -07:00
Tim Abbott b4507df8fa create_user: Remove tos parameter from management command.
This parameter was introduced in
ea11ce4ae6, and no longer serves a
purpose. Zulip will already correctly record that the user has not
agreed to ToS, and either prompt them on first login or not depending
whether the server is configured to require ToS.
2022-03-21 12:05:59 -07:00
Tim Abbott fddd83394e create_user: Specify tos_version=None explicitly in automation.
This is an important design detail, so we document this aspect of
creating users via both the management command and API code paths with
an explicit parameter value and comment.
2022-03-21 12:05:59 -07:00