compat: Remove SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT.

This commit is contained in:
Mateusz Mandera
2025-05-17 19:22:58 +02:00
committed by Tim Abbott
parent dd5ae0af44
commit ee1801feba
4 changed files with 4 additions and 15 deletions

View File

@@ -65,7 +65,6 @@ from .configured_settings import (
SOCIAL_AUTH_SAML_SECURITY_CONFIG,
SOCIAL_AUTH_SUBDOMAIN,
SOCIAL_AUTH_SYNC_ATTRS_DICT,
SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT,
STATIC_URL,
SUBMIT_USAGE_STATISTICS,
TORNADO_PORTS,
@@ -1216,17 +1215,6 @@ def ensure_dict_path(d: dict[str, Any], keys: list[str]) -> None:
d = d[key]
# Merge SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT into SOCIAL_AUTH_SYNC_ATTRS_DICT.
# This is compat code for the original SOCIAL_AUTH_CUSTOM_ATTRS_DICT setting.
# TODO/compatibility: Remove this for release Zulip 10.0.
for subdomain, dict_for_subdomain in SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT.items():
for backend_name, custom_attrs_map in dict_for_subdomain.items():
ensure_dict_path(SOCIAL_AUTH_SYNC_ATTRS_DICT, [subdomain, backend_name])
for custom_attr_name, source_attr_name in custom_attrs_map.items():
SOCIAL_AUTH_SYNC_ATTRS_DICT[subdomain][backend_name][f"custom__{custom_attr_name}"] = (
source_attr_name
)
SOCIAL_AUTH_PIPELINE = [
"social_core.pipeline.social_auth.social_details",
"zproject.backends.social_auth_associate_user",

View File

@@ -112,7 +112,6 @@ SOCIAL_AUTH_APPLE_EMAIL_AS_USERNAME = True
SOCIAL_AUTH_OIDC_ENABLED_IDPS: dict[str, OIDCIdPConfigDict] = {}
SOCIAL_AUTH_OIDC_FULL_NAME_VALIDATED = False
SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT: dict[str, dict[str, dict[str, str]]] = {}
SOCIAL_AUTH_SYNC_ATTRS_DICT: dict[str, dict[str, dict[str, str]]] = {}
# Other auth

View File

@@ -441,8 +441,8 @@ SOCIAL_AUTH_SAML_ENABLED_IDPS: dict[str, Any] = {
"attr_username": "email",
"attr_email": "email",
## List of additional attributes to fetch from the SAMLResponse.
## These attributes will be available for synchronizing custom profile fields.
## in SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT.
## These attributes will be available for synchronizing user profile fields.
## in SOCIAL_AUTH_SYNC_ATTRS_DICT.
# "extra_attrs": ["title", "mobilePhone", "zulip_role"],
##
## The "x509cert" attribute is automatically read from