Skip to content

Commit dac79c4

Browse files
m4ragoapunk
authored andcommitted
apps,deps: allauth v.63.2
1 parent b82ead1 commit dac79c4

File tree

6 files changed

+24
-11
lines changed

6 files changed

+24
-11
lines changed

adhocracy-plus/config/settings/base.py

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"allauth",
3838
"allauth.account",
3939
"allauth.socialaccount",
40-
"allauth.socialaccount.providers.dummy",
4140
"rules.apps.AutodiscoverRulesConfig",
4241
"easy_thumbnails",
4342
"parler",

adhocracy-plus/config/settings/dev.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# SECURITY WARNING: keep the secret key used in production secret!
1010
SECRET_KEY = "k3l^@x53$l5@y(fo6ivgplj&q^^rmtl^enzse5ozxuepx0$s()"
1111

12+
INSTALLED_APPS += ("allauth.socialaccount.providers.dummy",)
13+
1214
try:
1315
import debug_toolbar
1416
except ImportError:

apps/users/adapters.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def get_email_confirmation_url(self, request, emailconfirmation):
5454
def send_mail(self, template_prefix, email, context):
5555
return UserAccountEmail.send(email, template_name=template_prefix, **context)
5656

57-
def get_email_confirmation_redirect_url(self, request):
58-
if "next" in request.GET and url_has_allowed_host_and_scheme(
59-
request.GET["next"], allowed_hosts=None
57+
def get_email_verification_redirect_url(self, email_address):
58+
if "next" in self.request.GET and url_has_allowed_host_and_scheme(
59+
self.request.GET["next"], allowed_hosts=None
6060
):
61-
return request.GET["next"]
61+
return self.request.GET["next"]
6262
else:
63-
return super().get_email_confirmation_redirect_url(request)
63+
return super().get_email_verification_redirect_url(email_address)
6464

6565
def clean_username(self, username):
6666
username = super().clean_username(username)

apps/users/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class User(auth_models.AbstractBaseUser, auth_models.PermissionsMixin):
126126
objects = auth_models.UserManager()
127127

128128
USERNAME_FIELD = "username"
129+
REQUIRED_FIELDS = ["email"]
129130

130131
def get_projects_follow_list(self, exclude_private_projects=False):
131132
projects = Project.objects.filter(

changelog/8102.md

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
### Removed
22

33
- unique email constraint
4-
- add social account autoconnect to enable social account email connecting to existing regular account
5-
- add templates for email verification, password reset, socialaccount login, authentication error, and dummy authentication to address the template changes of allauth v.0.58.0
6-
- remove deprecated settings for account rate limits (removed in allauth v.0.61.0
7-
- update to allauth v.0.62.0
4+
- deprecated settings for account rate limits (removed in allauth v.0.61.0)
5+
6+
### Added
7+
8+
- social account autoconnect to enable social account email connecting to existing regular account
9+
- dummy provider in dev settings for testing purposes
10+
- templates for email verification, password reset, socialaccount login, authentication error, and dummy authentication to address the template changes of allauth v.0.58.0
11+
12+
### Changed
13+
14+
- inherited adapter's method from get_email_confirmation_redirect_url to get_email_verification_redirect_url
15+
16+
### Updated
17+
18+
- to latest allauth v.0.63.2

requirements/base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ redis==5.0.4
1616

1717
# Inherited a4-core requirements
1818
Django==4.2.13
19-
django-allauth==0.62.0
19+
django-allauth[socialaccount]==0.63.2
2020
git+https://github.com/liqd/django-autoslug.git@liqd2212#egg=django-autoslug
2121
django-ckeditor==6.7.1
2222
https://github.com/liqd/django-ckeditor-5/releases/download/v0.2.12-liqd/django_ckeditor_5-0.2.12-py3-none-any.whl

0 commit comments

Comments
 (0)