Skip to content

Requirements: update django-allauth #9249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions media/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -835,18 +835,25 @@ div.project-import-remote button.remote-sync:before {
content: "\f021";
}

a.socialaccount-provider.github:before {
button.socialaccount-provider {
padding: 6px 10px 6px 10px;
font-size: 16px;
margin: 10px 5px 10px 0px;
line-height: 24px;
}

button.socialaccount-provider.github:before {
font-family: FontAwesome;
content: "\f09b";
}

a.socialaccount-provider.gitlab:before {
button.socialaccount-provider.gitlab:before {
font-family: FontAwesome;
content: "\f296";
}

a.socialaccount-provider.bitbucket:before,
a.socialaccount-provider.bitbucket_oauth2:before {
button.socialaccount-provider.bitbucket:before,
button.socialaccount-provider.bitbucket_oauth2:before {
font-family: FontAwesome;
content: "\f171";
}
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/static-src/projects/css/import.less
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ div.project-import-remote {
overflow: auto;
text-align: center;

a.socialaccount-provider {
button.socialaccount-provider {
float: none;
display: inline-block;
margin-bottom: 0.5em;
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/static/projects/css/import.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ div.project-import-remote ul.socialaccount_providers li {
overflow: auto;
text-align: center;
}
div.project-import-remote ul.socialaccount_providers li a.socialaccount-provider {
div.project-import-remote ul.socialaccount_providers li button.socialaccount-provider {
float: none;
display: inline-block;
margin-bottom: 0.5em;
Expand Down
1 change: 1 addition & 0 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ def DOCKER_LIMITS(self):
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_ACTIVATION_DAYS = 7
SOCIALACCOUNT_AUTO_SIGNUP = False
SOCIALACCOUNT_STORE_TOKENS = True
SOCIALACCOUNT_PROVIDERS = {
'github': {
'SCOPE': [
Expand Down
28 changes: 28 additions & 0 deletions readthedocs/templates/429.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% extends "base.html" %}
{% load core_tags %}
{% load i18n %}

{% block title %}
{% trans "Too many requests" %}
{% endblock %}

{% block header-wrapper %}
{% include "error_header.html" %}
{% endblock %}

{% block notify %}{% endblock %}

{# Hide the language select form so we don't set a CSRF cookie #}
{% block language-select-form %}{% endblock %}

{% block content %}
<pre style="line-height: 1.25; white-space: pre;">
.--~~,__
:-....,-------`~~'._.'
`-,,, ,_ ;'~U'
_,-' ,'`-__; '--.
(_/'~~ ''''(;

Too many requests! Try again in a bit.
</pre>
{% endblock %}
1 change: 1 addition & 0 deletions readthedocs/templates/account/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "base.html" %}
34 changes: 18 additions & 16 deletions readthedocs/templates/socialaccount/snippets/provider_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,30 @@
{% if provider.id == "openid" %}
{% for brand in provider.get_brands %}
<li>
<a title="{{ brand.name }}"
class="socialaccount-provider {{ provider.id }} {{ brand.id }} button"
href="{% provider_login_url provider.id openid=brand.openid_url process=process next=next %}"
>
{% blocktrans trimmed with brand_name=brand.name verbiage=verbiage|default:'Connect to' %}
{{ verbiage }} {{ brand_name }}
{% endblocktrans %}
</a>
<form action="{% provider_login_url provider.id openid=brand.openid_url process=process next=next %}" method="post">
{% csrf_token %}
<button
class="socialaccount-provider {{ provider.id }} {{ brand.id }} button"
type="submit"
title="{{ brand.name }}">
{% trans verbiage|default:'Connect to' %} {{ brand.name }}
</button>
</form>
</li>
{% endfor %}
{% endif %}
{% if provider.id != 'bitbucket' %}
{% if allowed_providers and provider.id in allowed_providers or not allowed_providers %}
<li>
<a title="{{ provider.name }}"
class="socialaccount-provider {{ provider.id }} button"
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params next=next %}"
>
{% blocktrans trimmed with provider_name=provider.name verbiage=verbiage|default:'Connect to' %}
{{ verbiage }} {{ provider_name }}
{% endblocktrans %}
</a>
<form action="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params next=next %}" method="post">
{% csrf_token %}
<button
class="socialaccount-provider {{ provider.id }} button"
type="submit"
title="{{ provider.name }}">
{% trans verbiage|default:'Connect to' %} {{ provider.name }}
</button>
</form>
</li>
{% endif %}
{% endif %}
Expand Down
8 changes: 1 addition & 7 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ redis==3.5.3 # pyup: ignore

celery==5.2.6

# When upgrading to 0.43.0 we should double check the ``base.html`` change
# described in the changelog. In previous versions, the allauth app included a
# ``base.html`` template. This template could conflict with an equally named
# template at project level. Therefore, ``base.html`` has now been moved to
# ``account/base.html`` -- you will need to check your templates and likely
# override ``account/base.html`` within your project.
django-allauth==0.42.0 # pyup: ignore
django-allauth==0.50.0
requests-oauthlib==1.3.1

GitPython==3.1.27
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ setenv =
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
DJANGO_SETTINGS_SKIP_LOCAL=True
VIRTUALENV_SETUPTOOLS=58.3.0
passenv = CI TRAVIS TRAVIS_* HOME
deps =
-r requirements/testing.txt
Expand Down