Commit Graph

55953 Commits

Author SHA1 Message Date
Alex Vandiver b000328ba5 puppet: Adjust uptrack permissions and ownership to match package's.
This reverts a759d26a327cd4337d68eaa1d45d6a69edc9161c; apparently the
package has switched back.
2024-01-09 12:31:02 -08:00
Evgenii 3f06596cf0
dev_ldap_directory: Use f-strings for better readability. 2024-01-09 12:09:09 -08:00
Alya Abbott 1a927c50b0 help: Document plan sign-up in notification troubleshooting section. 2024-01-09 10:45:47 -08:00
N-Shar-ma ed949fbc92 compose: Fix duplicate warning banners for the same private stream.
Earlier, a new banner would be showed for each mention of the same
private stream in the compose box. This commit fixes that by checking
if the private stream warning banners already shown include the private
stream just mentioned, and if so, not showing a new banner.

This implementation is in line with the one for warnings for mentions of
users not subscribed to the current stream.

Fixes: #26914.
2024-01-09 10:44:43 -08:00
ecxtacy 62fcb08b1b dev: Center devtool link buttons on devlogin page. 2024-01-09 10:42:47 -08:00
ecxtacy b771c34493 dev: Restructure devlogin page link.
Relocate the `developer tools` link from bottom to the top.
Edit the sentence appropriately.
2024-01-09 10:42:47 -08:00
Anuja Patil a3252e0de7
typeahead: Improve slash command typeahead text.
Update the text displayed in the typeahead suggestions for slash commands 
(/poll, /todo, /me) to be cleaner and clearer.

Fixes #27391.
2024-01-09 10:34:05 -08:00
Karl Stolley b80f8eabd4 plans: Specify text color on :active comparison links. 2024-01-09 10:20:00 -08:00
Karl Stolley 6d3f0361f5 plans: Remove overwrought !important declarations.
These were unnecessary, and interfered with expected link, :hover,
and :active styles.
2024-01-09 10:20:00 -08:00
Lauryn Menard 2994685399 support: Add admin support for updating end date of active plan.
This currently will only apply to tier.SELF_HOSTED_LEGACY plans.
2024-01-09 10:13:21 -08:00
Lauryn Menard 71263ac2ab support: Include legacy plan without upgrade in remote support tests. 2024-01-09 10:13:21 -08:00
Anders Kaseorg 79379c479d notification_settings: Open push notification docs link in new tab.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-09 09:22:31 -08:00
Aman Agrawal 37c1b88917 stripe: Only enable free trial for basic plan. 2024-01-08 14:41:22 -08:00
Aman Agrawal 398c889ce1 plans: Ask customer to contact sales to switch plan tier. 2024-01-08 14:41:22 -08:00
Aman Agrawal ad093e851b plans: Don't show discount for customers on a non-legacy plan.
Only new customers and customers on legacy plan
are eligible for discount.
2024-01-08 14:41:22 -08:00
Aman Agrawal 2c6a811468 upgrade: Fix free trial showing annual schedule.
If localstorage has `annual` schedule set, upgrade page for
free trial will show annual schedule. We fix it was overriding
the schedule if it was set to be fixed to a value by us.
2024-01-08 14:41:22 -08:00
Aman Agrawal 3cb1ebeb34 plans: Align price with `details` when no discount is applied. 2024-01-08 14:41:22 -08:00
Aman Agrawal 073f432a69 stripe: Set min license count based on flat discount.
For self hosted basic plan, we need to allow customers to subscribe
without purchasing 10 licenses and also we need to allow customer
take fully use the available discount so that if the add more
users in the future, the full discount was already applied.

To fix above, we set minimum user count to the least number
of licenses we require for the charge to be positive after applying
the complete discount.
2024-01-08 14:17:56 -08:00
Karl Stolley 536d2f4e7f portico: Extend proper background gradients to /plans. 2024-01-08 14:15:37 -08:00
Alex Vandiver 7a6acc9bbf logrotate: smokescreen has its own config file.
149bea8309 added a separate config file
for smokescreen (which is necessary because it can be installed
separately) but failed ot notice that `zulip.template.erb` already had
a config line for it.  This leads to failures starting the logrotate
service:

```
logrotate[4158688]: error: zulip:1 duplicate log entry for /var/log/zulip/smokescreen.log
logrotate[4158688]: error: found error in file zulip, skipping
```

Remove the duplicate line.
2024-01-08 14:05:01 -08:00
Akash Kumar Singh 2f9b5081ed docs: Update PostgreSQL support table for Zulip Server 8.x.
Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2024-01-08 15:17:09 -05:00
kota-karthik 9143172619 settings: Fix color leak during row dragging in tables.
Fixed an issue in the linkifier and custom profile tables where
dragging darker rows color changes in the background.
Following a CZO discussion on using alpha values in HSL,
I implemented a fix using the CSS color-mix property. This approach
mixes the original color with var(--color-background-modal) in
sRGB mode, effectively eliminating the use of alpha and preventing
color leaks. For more context, see the CZO discussion:
[https://chat.zulip.org/#narrow/stream/6-frontend/topic/alphas.20in.20color.20definitions].

Fixes #26480.
2024-01-07 19:30:00 -08:00
Alex Vandiver 9c336e4374 documentation: Support having no sidebar for policies docs.
We document the sidebar as being optional, so make it so.
2024-01-07 19:11:16 -08:00
Angelica Ferlin 3fcb44e24d
organization settings: Use tippy for edit/delete custom field.
Fixes #27816.
2024-01-07 19:08:05 -08:00
Alex Vandiver 5b1387c9ba send_password_reset_email: Add a flag to only email users who need it.
Emailing the password reset email to users who have already logged in
is not as useful.
2024-01-07 16:43:31 -08:00
Alex Vandiver 6635f3ea12 send_password_reset_email: Narrow type of users.
5a32ea52ae changed the return type of `get_users`, enabling this.
2024-01-07 16:43:31 -08:00
Sharif Naas bafea0e7be
docs: Add a more direct link to the code for the push notification bouncer. 2024-01-07 16:41:41 -08:00
N-Shar-ma f99635d582 refactor: Pass only stream id, not name, to `compose_actions.start()`.
As part of the process of moving from stream names to ids, we now only
pass the stream id in compose args to `compose_actions.start()`.

For when we still need the stream name, and have access to the compose
args, we compute it from the id exactly where needed, to localise the
instances of stream names.
2024-01-07 16:39:56 -08:00
Lauryn Menard d8044a1b07 api-docs: Revise text of /api/test-notify endpoint.
Updates title and main description to follow the general style
of the API endpoint documentation.

Updates `token` description to clarify suggested mobile client
behavior.
2024-01-05 17:07:28 -08:00
Lauryn Menard 5051ad6ca5 api-tests: Exclude some documented endpoints from curl tests.
Adds a set of excluded endpoints for the test of generated curl
examples in the API documentation.

Currently, only the `api/test-notify` endpoint is excluded since
there would need to be a push notification bouncer set up to test
that generated curl example.
2024-01-05 17:07:28 -08:00
Lauryn Menard 63dd057298 support: Include mobile users and mobile push data.
Adds the count for mobile users and mobile pushes forwarded to
the remote support view for both servers and realms.
2024-01-05 16:55:38 -08:00
Lauryn Menard 92ebeb7baa support: Add a link to remote server's installation analytics page. 2024-01-05 16:55:38 -08:00
Lauryn Menard f3d0ec15ca support: Clarify what missing data caused MissingDataError.
Update strings for support views to indicate if analytics data or
audit log data was missing and caused a MissingDataError.
2024-01-05 16:55:38 -08:00
Sahil Batra 63363ba50a push_notification: Check users count for plans to be downgraded.
We return expected_end_timestamp as "None" for the plans to be
downgraded if number of users is not more than MAX_USERS_WITHOUT_PLAN
since they will be downgraded to self-managed plan and would
have push notifications enabled.
2024-01-05 13:30:57 -08:00
Alex Vandiver f9834d4e6d ci: Switch 6.0 production to be on Ubuntu 22.04.
This causes us to cover all of our supported operating systems, and
Ubuntu 22.04 support was originally added in Zulip Server 6.0.
2024-01-05 13:19:07 -08:00
Alex Vandiver 9f12e1437a ci: Test upgrades from Zulip Server 8.0. 2024-01-05 13:19:07 -08:00
Mateusz Mandera 3ec3ac63f2 zilencer: Have server send realm_uuid to remaining bouncer endpoints.
Requests to these endpoint are about a specified user, and therefore
also have a notion of the RemoteRealm for these requests. Until now
these endpoints weren't getting the realm_uuid value, because it wasn't
used - but now it is needed for updating .last_request_datetime on the
RemoteRealm.
2024-01-05 13:09:09 -08:00
Mateusz Mandera cbfbdd7337 zilencer: Add last_request_datetime to RemoteRealm + RemoteZulipServer.
For the RemoteRealm case, we can only set this in endpoints where the
remote server sends us the realm_uuid. So we're missing that for the
endpoints:

- remotes/push/unregister and remotes/push/unregister/all
- remotes/push/test_notification

This should be added in a follow-up commit.
2024-01-05 13:09:09 -08:00
Alex Vandiver ee2baa30e0 fetch-contributor-data: Add zulip-flutter repo. 2024-01-05 12:15:39 -08:00
Alex Vandiver ffda5fb428 fetch-contributor-data: Sort repo names. 2024-01-05 12:15:39 -08:00
Mateusz Mandera 42343cd8d9 remote_billing: Improve nocoverage tagging on self_hosting_auth_redirect. 2024-01-05 12:06:43 -08:00
Mateusz Mandera 1ee45314c1 tests: Fix how test_is_outdated_server works.
os.path.getmtime needs to be mock.patched or otherwise the success of
the test depends on the filesystem state and breaks if version.py hasn't
been modified in a while.
2024-01-05 12:06:43 -08:00
Prakhar Pratyush 4715a058b0 migrate_customers: Migrate customer from server to realms during login.
Earlier, the 'handle_customer_migration_from_server_to_realms'
function was called during the send analytics step.

It resulted in an error for customers having multiple Zulip servers,
one for testing and the others for not-testing, sharing a
push bouncer registration.

The migration step when run in a test instance caused customers to
have their legacy plan migrated to a test realm, resulting in them
losing their legacy plan.

This commit moves the migration step to run during plan management
login step. This reduces the chances of losing legacy
plan as we expect them to only verify that 8.0 upgrade works and
not bother trying to login to plan management from their test instance.
2024-01-05 12:02:54 -08:00
Alex Vandiver 4ab9cd7cf2 markdown: Prevent OverflowError with large time integers.
`<time:1234567890123>` causes a "signed integer is greater than
maximum" exception from dateutil.parser; datetime also cannot handle
it ("year 41091 is out of range") but that is a ValueError which is
already caught.

Catch the OverflowError thrown by dateutil.
2024-01-05 12:01:06 -08:00
Varun Singh af3b15ef10 read_receipts: Convert module to TypeScript. 2024-01-05 11:52:59 -08:00
Tim Abbott c5a9c78af7 settings_realm_domains: Fix linter error.
This got through into main because the linter error is new.
2024-01-05 11:32:04 -08:00
Alex Vandiver 75d6f35069 s3: Add a setting for S3 addressing style.
This controls if boto3 attempts to use
`https://bucketname.endpointname/` or `https://endpointname/bucket/`
as its prefix.  See
https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

Fixes: #28424.
2024-01-05 11:12:18 -08:00
Alex Vandiver 3aea67a8ed s3: Only use get_bucket to get to boto3 clients and resources.
boto3 has two different modalities of making API calls -- through
resources, and through clients.  Resources are a higher-level
abstraction, and thus more generally useful, but some APIs are only
accessible through clients.  It is possible to get to a client object
from a resource, but not vice versa.

Use `get_bucket(...).meta.client` when we need direct access to the
client object for more complex API calls; this lets all of the
configuration for how to access S3 to sit within `get_bucket`.  Client
objects are not bound to only one bucket, but we get to them based on
the bucket we will be interacting with, for clarity.

We removed the cached session object, as it serves no real purpose.
2024-01-05 11:12:18 -08:00
Alex Vandiver 214bd4ed88 s3: Stop caching get_boto_client, which is only ever called once.
e883ab057f started caching the boto client, which we had identified
as slow call.  e883ab057f went further, calling
`get_boto_client().generate_presigned_url()` once and caching that
result.

This makes the inner cache on the client useless.  Remove it.
2024-01-05 11:12:18 -08:00
Varun Singh 4b04716237
settings_realm_domains: Convert module to TypeScript. 2024-01-05 10:50:08 -08:00