zulip/zerver
Mateusz Mandera 1d7d3fae61 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.
2024-09-19 15:26:27 -07:00
..
actions user_groups: Do not allow deleting user groups. 2024-09-18 13:41:13 -07:00
data_import mattermost: Handle duplicate dm-groups. 2024-09-09 12:05:28 -07:00
integration_fixtures/nagios
lib user_groups: Handle deactivated groups in webapp. 2024-09-18 13:41:13 -07:00
management upload: Use tusd for resumable, larger uploads. 2024-09-19 11:37:29 -07:00
migrations settings: Add 'allow_private_data_export' user setting. 2024-09-16 15:48:40 -07:00
models settings: Handle guests separately for group-based settings. 2024-09-18 11:51:11 -07:00
openapi user_groups: Do not allow deleting user groups. 2024-09-18 13:41:13 -07:00
tests signup: Mirror dummy user should be registered with role from invite. 2024-09-19 15:26:27 -07:00
tornado user_groups: Add client capability to handle deactivated groups. 2024-09-18 13:41:13 -07:00
transaction_tests ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
views signup: Mirror dummy user should be registered with role from invite. 2024-09-19 15:26:27 -07:00
webhooks integrations: Add support for release events to GitLab integration. 2024-09-16 09:26:20 -07:00
worker upload: Download files with their original names. 2024-09-09 12:40:17 -07:00
__init__.py
apps.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
context_processors.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
decorator.py upload: Use tusd for resumable, larger uploads. 2024-09-19 11:37:29 -07:00
filters.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
forms.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
logging_handlers.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
middleware.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
signals.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00