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.
This commit is contained in:
Mateusz Mandera
2024-04-02 00:56:05 +02:00
committed by Tim Abbott
parent c77ed52fa9
commit c9ca4e68e5
4 changed files with 64 additions and 13 deletions

View File

@@ -37,7 +37,8 @@ class OIDCIdPConfigDict(TypedDict, total=False):
auto_signup: bool
class SCIMConfigDict(TypedDict):
class SCIMConfigDict(TypedDict, total=False):
bearer_token: str
scim_client_name: str
name_formatted_included: bool
create_guests_without_streams: bool