scim: Add support for Groups.

This commit is contained in:
Mateusz Mandera
2025-04-12 02:56:02 +08:00
committed by Tim Abbott
parent a0b8e916c5
commit 254b0ff477
6 changed files with 1107 additions and 26 deletions

View File

@@ -1290,6 +1290,9 @@ SENTRY_DSN = os.environ.get("SENTRY_DSN", SENTRY_DSN)
SCIM_SERVICE_PROVIDER = {
"USER_ADAPTER": "zerver.lib.scim.ZulipSCIMUser",
"USER_FILTER_PARSER": "zerver.lib.scim_filter.ZulipUserFilterQuery",
"GROUP_ADAPTER": "zerver.lib.scim.ZulipSCIMGroup",
"GROUP_MODEL": "zerver.models.groups.NamedUserGroup",
"GROUP_FILTER_PARSER": "zerver.lib.scim_filter.ZulipGroupFilterQuery",
# NETLOC is actually overridden by the behavior of base_scim_location_getter,
# but django-scim2 requires it to be set, even though it ends up not being used.
# So we need to give it some value here, and EXTERNAL_HOST is the most generic.

View File

@@ -869,10 +869,6 @@ urls += [
r"^scim/v2/Groups/.search$",
scim_views.SCIMView.as_view(implemented=False),
),
re_path(
r"^scim/v2/Groups(?:/(?P<uuid>[^/]+))?$",
scim_views.SCIMView.as_view(implemented=False),
),
re_path(r"^scim/v2/Me$", scim_views.SCIMView.as_view(implemented=False)),
re_path(
r"^scim/v2/ServiceProviderConfig$",