We are just adding the ability to change the value of this setting in
this commit. It is not used for all possible permission checks on the
frontend yet. That will be done in future commits.
The function to check relevant permissions does so for multiple streams
at once to save us database query counts. Doing it one by one for every
stream would become very expensive.
We've also added `insufficient_permission_streams` to the filter
functions return type for streams for which the current user does not
have permission to subscribe other users.
We remove `invite_to_stream_policy` from the backend wherever applicable
except deleting the field. We have just ported the existing behaviour of
`invite_to_stream_policy` to `can_add_subscribers_group` except one
change. We have added an explicit exception for admins to have this
permission whether they are part of this group or not. The reason for
this is we are adding `stream.can_add_susbcribers_group` in the future
which will grant all admins permission to subscribe other users to a
channel given they have access to a channel. So it makes sense that we
add this exception to the realm level property also.
See https://chat.zulip.org/#narrow/channel/101-design/topic/Can.20subscribe.20other.20users.20on.20user.20profile/near/2039825
While `can_subscribe_other_users` property will make sense for the
current permissions structure where the ability to add subscribers to
channels is dictated with a realm level setting. In the future, we are
adding a channel level `can_add_subscribers_group`, and having a
property called `can_subscribe_other_users` in state_data will be
confusing since the permission to add subscribers will vary channel to
channel.
We have not removed user.can_subscribe_other_users, that will be better
removed when we add the channel level setting.
See more discussion at
https://chat.zulip.org/#narrow/channel/378-api-design/topic/invite_to_stream_policy.20deprecation/near/2039787
We are using `can_add_subscribers_group` instead of
`invite_to_stream_policy` to check whether a user can subscribe other
users.
We've removed `invite_to_stream_policy` from the frontend wherever
applicable.
The setting is not used anywhere yet either on the frontend or the
backend, we are just adding the ability to change the value of the realm
setting. We have also removed the ability to set
`invite_to_stream_policy` in this commit while it continues being used
to check permissions.
We have changed the label of the setting from `Who can add users to
channels` to `Who can subcribe users to channels` and label_parens_text
as `in addition to organization administrators` as discussed in
https://chat.zulip.org/#narrow/channel/101-design/topic/Can.20subscribe.20other.20users.20on.20user.20profile/near/2039825
In some cases, it is not possible to configure the load-balancer to
add an X-Forwarded-Proto header. If Zulip is serving its traffic over
HTTP, it will rightly error out, since it cannot guarantee that its
response will be served over an encrypted connection.
Add a new `loadbalancer.rejects_http_requests` settings which serves
as a way for the operator to swear that the load-balancer will *never*
serve responses from Zulip over an unencrypted connection. In most
cases, this is because the load-balancer is configured to have port 80
always serve an HTTP 301 redirect to the same URL over HTTPS.
Properly configuring the proxy to send `X-Forwarded-Proto` is always a
better solution than using this configuration parameter, so use of
this should be viewed as a last resort.
At Channel settings overlay, vertical keyboard navigation
on color picker was obstructed by stream_settings_ui.switch_rows.
This commit fixes the issue by using
`color_picker_popover.handle_keyboard` prior to
`stream_settings_ui.switch_rows`
b4fedaa765 introduced
this helper, and I assume that the weird loop over
zip made sense at the time.
The assertEqual approach on the whole
set gives nice messages in modern Python.
On smaller screens it is expected that the available space is used
to display much part of the content. 100% width ensures that while
max-width ensures that the dropdown button doesn't become too wide
where there's extra space available.
Using flex here caused overflow which was especially visible for
very long channel names(~60 characters). Even for the shorter
channel names there was slight overflow noticeable in input class
move_messages_edit_topic if left and right spacing was compared.
This commit fixes the issue by removing the flex display.
It was found that adding or removing an item from a group
or channel list updated the list correctly initially.
However, when revisiting the group or channel list tab, the
removed item was still present. The item was only removed
after closing and reopening the user profile menu popover.
This commit fixes the bug by correctly fetching the data
and live-updating the list.
Also, we used to re-render the groups and channels list
everytime we opened the groups or channels tab. Now, we
render the list only once when the corresponding tab is
opened for the first time.
Fixes: #33071
This is more of a workaround than a bug fix.
Some JS implementations are less "aggressive" about
canonicalizing things like America/Montreal to America/Toronto.
We instead use offset checks.
These tests are false positives in some cases, since
browser behavior varies.
We will kill off the function soon, but for now we
still maintain 100% coverage (albeit indirectly).
I also split up a test into two smaller ones.
This new test verifies that the server will
canonicalize the America/Montreal timezone to
America/Toronto. In general, we canonicalize via
the standard Python libraries for cities that
are aliases.
This is essentially a failing test that we can improve
by addressing #32934. It is also a useful test to measure
the actual impact of any improvements (with some more
instrumentation).
The use of assertCountEqual preceded
my changes to use a set instead of a list.
Now assertEqual is more clear and concise.
I should have noticed this in 36a6f0c547
but I caught it now.
Poll title was set to 18px which was leading to the title looking
smaller than the options in 20px font size. Removing that explicit
font-size declaration will make the h4 font-size fall back to 1.1em and
thus that title will scale properly to font-size changes. At 16px, the
font-size for the title was 18px initially, now it is 17.6px which
should not be that big of a change.
When we are upgrading a customer to a different plan tier, we should
check if switching plans would lead to different licenses due to
different minimum license requirement between plans.
Updates the name for the self-hosted complimentary access plan
to "Zulip Basic (complimentary)" instead of "Free (legacy plan)".
Since these plans are never billed in Stripe, we don't need to
hold to the 22 character limit for the plan name.
Updates support actions for "temporary courtesy" plans to instead
use "complimentary access" to refer to these plans and actions.
Prep for implementing a complimentary access plan for Zulip Cloud.
Renames migrate_customer_to_legacy_plan to
create_complimentary_access_plan for how this
function is currently used.
Prep for adding a complimentary access plan
for Zulip Cloud.
As we can now add a complimentary access plan (formerly legacy plan)
to a remote server or remote realm via the support view, we no
longer use or need this management command for our billing admin.
Renames context variables used for the pricing model template for
when the customer has a current plan that has an upgrade to a new
plan tier scheduled.
Fixes the "Upgrade scheduled" note that was being shown when an
annual fixed-price plan has a subsequent fixed-price plan scheduled
to start when the current plan ends.
Prep for adding a complimentary access plan for Zulip Cloud.
stream_topic variable is needed only when updating content
so we set the field inside is_content_edited block.
Also added a comment clarifying about why we use orig_stream
for stream ID.
We already have realm_id from message object passed to
do_update_message so there is no need to pass "None" to
update_message_cache for direct messages.
Previously, if "None" was passed to update_message_cache,
realm_id was eventually computed from stream if it was
a stream message and from Message object for direct messages.
But we always passed a value which is not "None" for stream
messages, and we can be sure that the message.realm will
always be the realm in which stream is present to which the
message was sent.
The majority of the label elements on the billing page are not
associated with a form element and function more as section headers.
Also removes the padding/margin 25px rules for these so that the
rendered page is less fragile to cases where content could overlap,
such as when there was no text before the next expected charge h1
element.
The for attribute for a label element is only used to associate it
with a form control. Removes the for attribute and any related
div element id attributes that were not being used.
Some of the label elements had no class attributes set in the
template, and all of them were being rendered the same in the
billing page. Therefore the "inline-block" and "label-title"
classes can be removed without any visual changes to the page.
Previously, the function reported success after a fixed delay of
500ms. With this change, we calculate the delay dynamically
to account for the time elapsed during the request and report
the success accordingly.