Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
compat: Remove SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT.
Mateusz Manderaee1801febae0
diff --git a/docs/overview/changelog.md b/docs/overview/changelog.mdindex 4d735dac264..cce800e80d5 100644--- a/docs/overview/changelog.md+++ b/docs/overview/changelog.md@@ -142,6 +142,8 @@ _Unreleased_- Zulip's incoming email integration was simplified to no longer use`postfix`. Installations using the integration will automaticallyuninstall `postfix` when upgraded.+- The `SOCIAL_AUTH_SYNC_CUSTOM_ATTRS_DICT` setting has been removed.+ It was deprecated in favor of `SOCIAL_AUTH_SYNC_ATTRS_DICT` in 10.0.## Zulip Server 10.x seriesdiff --git a/zproject/computed_settings.py b/zproject/computed_settings.pyindex 79efebdd722..746173f29f8 100644--- a/zproject/computed_settings.py+++ b/zproject/computed_settings.py@@ -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",diff --git a/zproject/default_settings.py b/zproject/default_settings.pyindex f2bb9b22279..029028a0481 100644--- a/zproject/default_settings.py+++ b/zproject/default_settings.py@@ -112,7 +112,6 @@ SOCIAL_AUTH_APPLE_EMAIL_AS_USERNAME = TrueSOCIAL_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 authdiff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.pyindex 15016a304c1..55da8891869 100644--- a/zproject/prod_settings_template.py+++ b/zproject/prod_settings_template.py@@ -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