Files
zulip/zproject/settings_types.py
Mateusz Mandera c9ca4e68e5 scim: Add config option to disable initial streams for guests.
When an organization (without open ability for anyone to join) invites a
guest user, the invitation prompts allows them to choose whether the
guest should be added to default streams or not. This is useful, because
since we don't have per-role default streams configs, they may want
default streams to be for full Members.

SCIM provisioning doesn't have this control, since a newly provisioned
user gets created via a direct do_create_user call, thus adding them to
the organization's default streams, with no workaround possible aside of
just getting rid of default streams in the organization.

To make provisioning guests in such an organization usable, we add a
simple config option to create them with no streams. It's configured by
adding
```
"create_guests_without_streams": True
```

to the config dict in settings.SCIM_CONFIG.
2024-04-11 12:28:26 -07:00

45 lines
1.0 KiB
Python

from typing import List, Optional, TypedDict
class JwtAuthKey(TypedDict):
key: str
# See https://pyjwt.readthedocs.io/en/latest/algorithms.html for a list
# of supported algorithms.
algorithms: List[str]
class SAMLIdPConfigDict(TypedDict, total=False):
entity_id: str
url: str
slo_url: str
sp_initiated_logout_enabled: bool
attr_user_permanent_id: str
attr_first_name: str
attr_last_name: str
attr_username: str
attr_email: str
attr_org_membership: str
auto_signup: bool
display_name: str
display_icon: str
limit_to_subdomains: List[str]
extra_attrs: List[str]
x509cert: str
x509cert_path: str
class OIDCIdPConfigDict(TypedDict, total=False):
oidc_url: str
display_name: str
display_icon: Optional[str]
client_id: str
secret: Optional[str]
auto_signup: bool
class SCIMConfigDict(TypedDict, total=False):
bearer_token: str
scim_client_name: str
name_formatted_included: bool
create_guests_without_streams: bool