diff --git a/docs/production/authentication-methods.md b/docs/production/authentication-methods.md index e8b51fea37..8e46153764 100644 --- a/docs/production/authentication-methods.md +++ b/docs/production/authentication-methods.md @@ -82,7 +82,7 @@ it as follows: "Attribute Mapping" with GSuite). You'll want to connect these so that Zulip gets the email address (used as a unique user ID) and name for the user. - 5. The `display_name` and `display_logo` fields are used to + 5. The `display_name` and `display_icon` fields are used to display the login/registration buttons for the IdP. 3. Install the certificate(s) required for SAML authentication. You diff --git a/templates/zerver/accounts_home.html b/templates/zerver/accounts_home.html index cdb4cfca43..b7cfb8a5ff 100644 --- a/templates/zerver/accounts_home.html +++ b/templates/zerver/accounts_home.html @@ -77,7 +77,7 @@ page can be easily identified in it's respective JavaScript file -->
-
diff --git a/templates/zerver/login.html b/templates/zerver/login.html index b2dc1518ff..4f5cbb9b3f 100644 --- a/templates/zerver/login.html +++ b/templates/zerver/login.html @@ -130,7 +130,7 @@ page can be easily identified in it's respective JavaScript file. -->
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index a3f31b8902..a33ed110ae 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -2173,7 +2173,7 @@ paths: type: array description: List of "social backend" objects, describing which social backends are enabled and their parameters - most importantly - the login url, display_name and display_logo. + the login url, display_name and display_icon. zulip_version: type: string description: The version of Zulip running in the server. @@ -2239,21 +2239,21 @@ paths: { "name": "saml:idp_name", "display_name": "SAML", - "display_logo": "", + "display_icon": "", "login_url": "/accounts/login/social/saml/idp_name", "signup_url": "/accounts/register/social/saml/idp_name" }, { "name": "google", "display_name": "Google", - "display_logo": "/static/images/landing-page/logos/googl_e-icon.png", + "display_icon": "/static/images/landing-page/logos/googl_e-icon.png", "login_url": "/accounts/login/social/google", "signup_url": "/accounts/register/social/google" }, { "name": "github", "display_name": "GitHub", - "display_logo": "/static/images/landing-page/logos/github-icon.png", + "display_icon": "/static/images/landing-page/logos/github-icon.png", "login_url": "/accounts/login/social/github", "signup_url": "/accounts/register/social/github" } diff --git a/zproject/backends.py b/zproject/backends.py index 82fe8ab0b5..252a09c7f2 100644 --- a/zproject/backends.py +++ b/zproject/backends.py @@ -997,7 +997,7 @@ def social_auth_finish(backend: Any, class SocialAuthMixin(ZulipAuthMixin): auth_backend_name = "undeclared" name = "undeclared" - display_logo = None # type: Optional[str] + display_icon = None # type: Optional[str] # Used to determine how to order buttons on login form, backend with # higher sort order are displayed first. @@ -1030,7 +1030,7 @@ class GitHubAuthBackend(SocialAuthMixin, GithubOAuth2): name = "github" auth_backend_name = "GitHub" sort_order = 100 - display_logo = "/static/images/landing-page/logos/github-icon.png" + display_icon = "/static/images/landing-page/logos/github-icon.png" def get_verified_emails(self, *args: Any, **kwargs: Any) -> List[str]: access_token = kwargs["response"]["access_token"] @@ -1096,13 +1096,13 @@ class AzureADAuthBackend(SocialAuthMixin, AzureADOAuth2): sort_order = 50 name = "azuread-oauth2" auth_backend_name = "AzureAD" - display_logo = "/static/images/landing-page/logos/azuread-icon.png" + display_icon = "/static/images/landing-page/logos/azuread-icon.png" class GoogleAuthBackend(SocialAuthMixin, GoogleOAuth2): sort_order = 150 auth_backend_name = "Google" name = "google" - display_logo = "/static/images/landing-page/logos/googl_e-icon.png" + display_icon = "/static/images/landing-page/logos/googl_e-icon.png" def get_verified_emails(self, *args: Any, **kwargs: Any) -> List[str]: verified_emails = [] # type: List[str] @@ -1123,7 +1123,7 @@ class SAMLAuthBackend(SocialAuthMixin, SAMLAuth): # SAML buttons at the top. sort_order = 9999 # There's no common default logo for SAML authentication. - display_logo = "" + display_icon = "" def auth_url(self) -> str: """Get the URL to which we must redirect in order to @@ -1254,17 +1254,17 @@ class SAMLAuthBackend(SocialAuthMixin, SAMLAuth): SocialBackendDictT = TypedDict('SocialBackendDictT', { 'name': str, 'display_name': str, - 'display_logo': str, + 'display_icon': str, 'login_url': str, 'signup_url': str, }) def create_standard_social_backend_dict(social_backend: SocialAuthMixin) -> SocialBackendDictT: - assert social_backend.display_logo is not None + assert social_backend.display_icon is not None return dict( name=social_backend.name, display_name=social_backend.auth_backend_name, - display_logo=social_backend.display_logo, + display_icon=social_backend.display_icon, login_url=reverse('login-social', args=(social_backend.name,)), signup_url=reverse('signup-social', args=(social_backend.name,)), ) @@ -1275,7 +1275,7 @@ def list_saml_backend_dicts(realm: Optional[Realm]=None) -> List[SocialBackendDi saml_dict = dict( name='saml:{}'.format(idp_name), display_name=idp_dict.get('display_name', SAMLAuthBackend.auth_backend_name), - display_logo=idp_dict.get('display_logo', SAMLAuthBackend.display_logo), + display_icon=idp_dict.get('display_icon', SAMLAuthBackend.display_icon), login_url=reverse('login-social-extra-arg', args=('saml', idp_name)), signup_url=reverse('signup-social-extra-arg', args=('saml', idp_name)), ) # type: SocialBackendDictT diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py index 84bc65ac42..354e54086c 100644 --- a/zproject/prod_settings_template.py +++ b/zproject/prod_settings_template.py @@ -224,14 +224,14 @@ SOCIAL_AUTH_SAML_ENABLED_IDPS = { # The "x509cert" attribute is automatically read from # /etc/zulip/saml/idps/{idp_name}.crt; don't specify it here. - # Optionally, you can edit display_name and display_logo + # Optionally, you can edit display_name and display_icon # settings below to change the name and icon that will show on # the login button. "display_name": "SAML", # Path to a square image file containing a logo to appear at # the left end of the login/register buttons for this IDP. # The default of "" results in a text-only button. - "display_logo": "", + "display_icon": "", } } diff --git a/zproject/test_settings.py b/zproject/test_settings.py index 5a11a4cfc3..70f316ea73 100644 --- a/zproject/test_settings.py +++ b/zproject/test_settings.py @@ -215,6 +215,6 @@ SOCIAL_AUTH_SAML_ENABLED_IDPS = { "attr_username": "email", "attr_email": "email", "display_name": "Test IdP", - "display_logo": "/static/images/landing-page/logos/saml-icon.png", + "display_icon": "/static/images/landing-page/logos/saml-icon.png", } }