This commit adds code to disable the role dropdown
when an owner is editing their own profile and they
are the only owner in the organization and a tooltip
is shown mentioning that.
We already keep the role dropdown disabled when an
admin user was managing an owner's profile.
Fixes#34830.
This commit renames classes used for edit pencil button in
the profile modal header so that class names are clear enough
to specify what the buttons do. This rename is needed because
admins can now see "Edit profile" tab, i.e. the "Manage user"
tab for other users, in their own profile modal.
Co-Authored-by: Aman Vishwakarma <vishwakarmarambhawan572@gmail.com>
This commit renames tab heading, tooltip and aria-label for the
pencil edit icon in the profile modal header from "Manage user"
to "Edit profile" for admin's own profile.
Fixes part of #34830.
For admin users, clicking on pencil edit icon in the profile
modal header opens the "Manage user" tab.
For non-admins, "Profile" settings panel is opened as before.
Fixes part of #34830.
Co-Authored-by: Aman Vishwakarma <vishwakarmarambhawan572@gmail.com>
Previouly admins did not see "Manage user" tab in their own
profile modal. This commit updates it to show the "Manage user"
tab to admins in their own profile modal as well.
Fixes part of #34830.
The currrent behavior is to auto-save field immediately on changing
the value only in "Profile" settings panel but not in "Manage user"
modal where we save the changes only after clicking "Save changes"
button.
To enable this behavior we checked if the date type field is being
changed for user's own account or for other user. But now we will
show "Manage user" modal in user's own profile as well so to enable
the above mentioned behavior we now use for_profile_settings_panel
boolean field.
This commit removes left padding for the stream privacy
and disabled icon in dropdown widgets. There is already
a padding in grid container and we are fine with removing
the 2px padding to avoid maintaining more pixel values.
The alignment of icon and text of the disabled option in
dropdown widget was somewhow broken due to an extra span
element present which broke the grid layout used for
rendering the icon and text properly.
This also makes the layout consistent with other options
shown with icon.
This was due to e643d7e6fd which resulted in space
between icon and text. We could have fix that by using
"~" character to remove whitespace in handlebar templates
but making the layout consistent felt a better choice.
Fixes the action button on the configure email banner that appears
before a demo organization owner has added an email address on the
invite user and convert demo organization modals.
Adds the banner-wrapper class so that the general CSS rules for
banners are applied.
Removes the extra padding on the button as it does not appear to
be necessary any longer as the font and line height for the banner
label and action buttons is now the same.
Temporarily exclude Git from `test_integration_doc_endpoints`,
until the doc is updated.
The screenshot for this integration is added separately since this
adds a new screenshot for an integration whose doc is in the
python-zulip-api repo.
Since this breaks the sync between the docs and the screenshots, an
exclusion is added to make the tests pass.
Temporarily exclude jira-plugin from `test_integration_doc_endpoints`,
until the doc is updated.
The screenshot for this integration is added separately since this
adds a new screenshot for an integration whose doc is in the
python-zulip-api repo.
Since this breaks the sync between the docs and the screenshots, an
exclusion is added to make the tests pass.
The integration doc and the screenshot images are in different repos.
So, we cannot avoid going out of sync when adding or deleting image
files.
Added a new set to allow temporarily adding exclusions to the
`test_integration_doc_endpoints` test.
Added testing for unmatched screenshot configs and conflicting entries,
which can be caused by manual error, since the screenshot configs are
hardcoded.
Previously, the test would fail at the first missing occurrence, and
not report about any other missing files.
Now, all missing cases are collected and presented together in a single
error message, every run.
For video and audio call integrations.
The new category is a subset of the "Communication" category, as all
"Video calling" integrations are also listed under "Communication".
This prevents a development-mode-only directory traversal attack,
where the Django development server could be made to respond to
requests for `/user_avatars/../../../../../../etc/passwd`.
The production server is not affected by this vulnerability, as
nginx's configuration sets `PATH_INFO` to `$document_uri`, which is
normalized[^1] -- that is, by the time uwsgi and Django see it, the path
has been percent-decoded once, and all `../` path components have been
applied[^2].
Close this by explicitly normalizing the paths before comparing; the
`LOCAL_UPLOADS_DIR` side is unlikely to require normalization as well,
but is also normalized for consistency. The failure here is left as
an assertion failure, and not a JsonableError, because it only affects
the development server.
[^1]: https://nginx.org/en/docs/http/ngx_http_core_module.html#var_uri
[^2]: https://nginx.org/en/docs/http/ngx_http_core_module.html#location
Updates the logic for getting the typists for a specific direct
message conversation to mirror narrow_state.set_compose_defaults
for the current filter's "dm" narrow term.
In Django, when cleaning a form field, all validators are run on
the field and all validation error messages are all collected.
Updates our test for invalid email addresses when creating a new
realm to confirm all expected error messages from the various
validators that are run on that field.
In commit c7a08f3b77, we started setting the realm_creation field
in both the RegistrationForm and its superclass, RealmDetailsForm,
which was likely a copy and paste error.
Since we only need to set the realm_creation field once when
initializing the form fields, we set it in the RealmDetailsForm,
which also removes any confusion related to the comment about
removing extra kwargs in the RegistrationForm initialization.
Systems upgrading from 11.x will have 0753 and not 0752, while systems
upgrading from main may have 0752 and not 0753, so a merge migration
is required to smoothly handle upgrades from both states.
The logic for inserting bookend when prepending messages was
missing.
Fixed by inserting the bookend at the correct position.
Reproducer:
Modify `message_fetch` parameters to only fetch
one message per fetch to ensure that each message is prepended.
Subscribe to a channel and send a message.
Reload.
Bookend is absent before the latest message without this commit.