zulip/zerver/views
Mateusz Mandera a7822f427e signup: Mirror dummy user should be registered with role from invite.
Aside of what's generally explained in the code comment, this is
motivated by the specific situation of import of Slack Connect channels.
These channels contain users who are "external collaborators" and
limited to a single channel in Slack. We don't have more sophisticated
handling of their import, which would map this concept 1-to-1 in Zulip -
but we create them as inactive dummy users, meaning they have to go
through signup before their account is usable.

The issue is that their imported UserProfile.role is set to Member and
when they register, the UserProfile gets reactivated with that role
unchanged. However, if e.g. the user is signing up after they received
an invitation from the admin, they should get the role that was
configured on the invite. In particular important if the user is meant
to still be "limited" and thus the admin invites them as a guest - they
definitely don't want the user to get a full Member account because of
this weird interaction between import and registration.

(cherry picked from commit 1d7d3fae61)
2024-11-18 18:32:25 -08:00
..
development thumbnail: Do not Camo old thumbor URLs; serve images directly. 2024-07-24 16:04:34 -07:00
__init__.py
alert_words.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
attachments.py attachments: Correct attachment_id type from string to integer. 2023-10-22 17:06:34 -07:00
auth.py zerver: Replace uri with url in local variables and comments. 2024-07-14 22:30:28 -07:00
compatibility.py django: Use HttpRequest.headers. 2022-05-13 20:42:20 -07:00
custom_profile_fields.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
digest.py
documentation.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
drafts.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
email_mirror.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
errors.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
events_register.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
health.py views: Add a /health healthcheck endpoint. 2023-09-20 09:53:59 -07:00
home.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
invite.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
message_edit.py events: Send `delete_message` event to user who deleted the message. 2024-07-16 23:29:02 -07:00
message_fetch.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
message_flags.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
message_send.py ruff: Fix FURB142 Use of set.add() in a for loop. 2024-07-14 13:52:59 -07:00
muted_users.py bots: Fix muting of cross realm bots. 2023-11-27 16:16:23 -08:00
onboarding_steps.py onboarding: Migrate to typed_endpoint. 2024-06-14 11:24:36 -07:00
presence.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
push_notifications.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
reactions.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
read_receipts.py requirements: Upgrade Python requirements. 2024-06-27 15:31:43 -07:00
realm.py auth: Fix re-enabling of SAML/AzureAD in organization settings UI. 2024-08-15 00:11:42 -07:00
realm_domains.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_emoji.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_export.py realm_export: Use .count(), instead of len(). 2024-04-13 21:50:42 -07:00
realm_icon.py upload: Pass down content-type of realm icon/logo to backend. 2024-07-11 07:31:39 -07:00
realm_linkifiers.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_logo.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_playgrounds.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
registration.py signup: Mirror dummy user should be registered with role from invite. 2024-11-18 18:32:25 -08:00
report.py csp_violations: Migrate has_request_variables to typed_endpoint. 2024-03-08 11:26:00 -08:00
scheduled_messages.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
sentry.py ruff: Fix UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`. 2024-07-13 22:28:22 -07:00
storage.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
streams.py streams: Convert to typed_enpoint. 2024-07-21 12:57:50 -07:00
submessage.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
thumbnail.py thumbnail: Do not Camo old thumbor URLs; serve images directly. 2024-07-24 16:04:34 -07:00
tutorial.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
typing.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
unsubscribe.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
upload.py thumbnail: Move get_image_thumbnail_path and split_thumbnail_path. 2024-07-18 13:50:28 -07:00
user_groups.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
user_settings.py settings: Add setting to control how animated images are played. 2024-07-22 14:53:31 -07:00
user_topics.py validators: Use cleaner syntax for AfterValidator. 2024-07-15 16:49:32 -07:00
users.py users: Change bot owner only if needed. 2024-07-17 10:07:51 -07:00
video_calls.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
zephyr.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00