diff --git a/templates/zerver/config_error.html b/templates/zerver/config_error.html index bd2d74c520..51bfbec8b7 100644 --- a/templates/zerver/config_error.html +++ b/templates/zerver/config_error.html @@ -48,47 +48,20 @@ {{ render_markdown_path('zerver/dev-not-supported-error.md', {"settings_path": settings_path}) }} {% endif %} - {% if google_error %} + {% if backend_error %} {% if development_environment %} - {{ render_markdown_path('zerver/google-error.md', {"root_domain_uri": root_domain_uri, "settings_path": secrets_path, "secrets_path": secrets_path, "client_id_key_name": "social_auth_google_key"}) }} + {{ render_markdown_path('zerver/'+social_backend_name+'-error.md', + {"root_domain_uri": root_domain_uri, "settings_path": secrets_path, "secrets_path": secrets_path, + "client_id_key_name": "social_auth_" + social_backend_name + "_key"}) }}

For more information, have a look at - the authentication + the authentication setup guide for the development environment.

{% else %} - {{ render_markdown_path('zerver/google-error.md', {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path, "client_id_key_name": "SOCIAL_AUTH_GOOGLE_KEY"}) }} - {% endif %} - {% endif %} - - {% if github_error %} - {% if development_environment %} - {{ render_markdown_path('zerver/github-error.md', {"root_domain_uri": root_domain_uri, "settings_path": secrets_path, "secrets_path": secrets_path, "client_id_key_name": "social_auth_github_key"}) }} -

- For more information, have a look at - the authentication - setup guide for the development environment. -

- {% else %} - {{ render_markdown_path('zerver/github-error.md', {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path, "client_id_key_name": "SOCIAL_AUTH_GITHUB_KEY"}) }} - {% endif %} - {% endif %} - - {% if gitlab_error %} - {% if development_environment %} - {{ render_markdown_path('zerver/gitlab-error.md', {"root_domain_uri": root_domain_uri, "settings_path": secrets_path, "secrets_path": secrets_path, "client_id_key_name": "social_auth_gitlab_key"}) }} -

- For more information, have a look at - the authentication - setup guide for the development environment. -

- {% else %} - {{ render_markdown_path('zerver/gitlab-error.md', {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path, "client_id_key_name": "SOCIAL_AUTH_GITLAB_KEY"}) }} - {% endif %} - {% endif %} - - {% if google_error or github_error or gitlab_error %} - {% if not development_environment %} + {{ render_markdown_path('zerver/'+social_backend_name+'-error.md', + {"root_domain_uri": root_domain_uri, "settings_path": settings_path, "secrets_path": secrets_path, + "client_id_key_name": "SOCIAL_AUTH_" + social_backend_name.upper() + "_KEY"}) }}

For more information, have a look at our authentication diff --git a/zproject/urls.py b/zproject/urls.py index 2343342920..a54aa7c699 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -567,13 +567,13 @@ i18n_urls = [ url(r'^config-error/google$', TemplateView.as_view( template_name='zerver/config_error.html',), - {'google_error': True},), + {'backend_error': True, 'social_backend_name': 'google'},), url(r'^config-error/github$', TemplateView.as_view( template_name='zerver/config_error.html',), - {'github_error': True},), + {'backend_error': True, 'social_backend_name': 'github'},), url(r'^config-error/gitlab$', TemplateView.as_view( template_name='zerver/config_error.html',), - {'gitlab_error': True},), + {'backend_error': True, 'social_backend_name': 'gitlab'},), url(r'^config-error/smtp$', TemplateView.as_view( template_name='zerver/config_error.html',), {'smtp_error': True},),