From 1eda42f5093687f9d4d59846dc3cb10cc11d2187 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Wed, 26 Oct 2022 14:56:00 +0200 Subject: [PATCH] images: Create `/authentication_backends` directory for icons. Creates `static/images/authentication_backends` directory for icons of backend authentication methods, which are used on the log-in page. And updates the example documentation in the API `/server_settings` endpoint. --- .../apple-icon.png | Bin .../azuread-icon.png | Bin .../github-icon.png | Bin .../gitlab-icon.png | Bin .../googl_e-icon.png | Bin zerver/openapi/zulip.yaml | 4 ++-- zproject/backends.py | 10 +++++----- 7 files changed, 7 insertions(+), 7 deletions(-) rename static/images/{landing-page/logos => authentication_backends}/apple-icon.png (100%) rename static/images/{landing-page/logos => authentication_backends}/azuread-icon.png (100%) rename static/images/{landing-page/logos => authentication_backends}/github-icon.png (100%) rename static/images/{landing-page/logos => authentication_backends}/gitlab-icon.png (100%) rename static/images/{landing-page/logos => authentication_backends}/googl_e-icon.png (100%) diff --git a/static/images/landing-page/logos/apple-icon.png b/static/images/authentication_backends/apple-icon.png similarity index 100% rename from static/images/landing-page/logos/apple-icon.png rename to static/images/authentication_backends/apple-icon.png diff --git a/static/images/landing-page/logos/azuread-icon.png b/static/images/authentication_backends/azuread-icon.png similarity index 100% rename from static/images/landing-page/logos/azuread-icon.png rename to static/images/authentication_backends/azuread-icon.png diff --git a/static/images/landing-page/logos/github-icon.png b/static/images/authentication_backends/github-icon.png similarity index 100% rename from static/images/landing-page/logos/github-icon.png rename to static/images/authentication_backends/github-icon.png diff --git a/static/images/landing-page/logos/gitlab-icon.png b/static/images/authentication_backends/gitlab-icon.png similarity index 100% rename from static/images/landing-page/logos/gitlab-icon.png rename to static/images/authentication_backends/gitlab-icon.png diff --git a/static/images/landing-page/logos/googl_e-icon.png b/static/images/authentication_backends/googl_e-icon.png similarity index 100% rename from static/images/landing-page/logos/googl_e-icon.png rename to static/images/authentication_backends/googl_e-icon.png diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 841915a9f4..3ca9083487 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -13321,14 +13321,14 @@ paths: { "name": "google", "display_name": "Google", - "display_icon": "/static/images/landing-page/logos/googl_e-icon.png", + "display_icon": "/static/images/authentication_backends/googl_e-icon.png", "login_url": "/accounts/login/social/google", "signup_url": "/accounts/register/social/google", }, { "name": "github", "display_name": "GitHub", - "display_icon": "/static/images/landing-page/logos/github-icon.png", + "display_icon": "/static/images/authentication_backends/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 f473a7a7c5..7d660f7109 100644 --- a/zproject/backends.py +++ b/zproject/backends.py @@ -1851,7 +1851,7 @@ class GitHubAuthBackend(SocialAuthMixin, GithubOAuth2): name = "github" auth_backend_name = "GitHub" sort_order = 100 - display_icon = "/static/images/landing-page/logos/github-icon.png" + display_icon = "/static/images/authentication_backends/github-icon.png" def get_all_associated_email_objects(self, *args: Any, **kwargs: Any) -> List[Dict[str, Any]]: access_token = kwargs["response"]["access_token"] @@ -1946,7 +1946,7 @@ class AzureADAuthBackend(SocialAuthMixin, AzureADOAuth2): sort_order = 50 name = "azuread-oauth2" auth_backend_name = "AzureAD" - display_icon = "/static/images/landing-page/logos/azuread-icon.png" + display_icon = "/static/images/authentication_backends/azuread-icon.png" @external_auth_method @@ -1954,7 +1954,7 @@ class GitLabAuthBackend(SocialAuthMixin, GitLabOAuth2): sort_order = 75 name = "gitlab" auth_backend_name = "GitLab" - display_icon = "/static/images/landing-page/logos/gitlab-icon.png" + display_icon = "/static/images/authentication_backends/gitlab-icon.png" # Note: GitLab as of early 2020 supports having multiple email # addresses connected with a GitLab account, and we could access @@ -1970,7 +1970,7 @@ class GoogleAuthBackend(SocialAuthMixin, GoogleOAuth2): sort_order = 150 auth_backend_name = "Google" name = "google" - display_icon = "/static/images/landing-page/logos/googl_e-icon.png" + display_icon = "/static/images/authentication_backends/googl_e-icon.png" def get_verified_emails(self, *args: Any, **kwargs: Any) -> List[str]: verified_emails: List[str] = [] @@ -2001,7 +2001,7 @@ class AppleAuthBackend(SocialAuthMixin, AppleIdAuth): sort_order = 10 name = "apple" auth_backend_name = "Apple" - display_icon = "/static/images/landing-page/logos/apple-icon.png" + display_icon = "/static/images/authentication_backends/apple-icon.png" # Apple only sends `name` in its response the first time a user # tries to sign up, so we won't have it in consecutive attempts.