Skip to content

Commit

Permalink
apps,deps: allauth v.63.2
Browse files Browse the repository at this point in the history
  • Loading branch information
m4ra authored and goapunk committed May 30, 2024
1 parent b82ead1 commit dac79c4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
1 change: 0 additions & 1 deletion adhocracy-plus/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.dummy",
"rules.apps.AutodiscoverRulesConfig",
"easy_thumbnails",
"parler",
Expand Down
2 changes: 2 additions & 0 deletions adhocracy-plus/config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "k3l^@x53$l5@y(fo6ivgplj&q^^rmtl^enzse5ozxuepx0$s()"

INSTALLED_APPS += ("allauth.socialaccount.providers.dummy",)

try:
import debug_toolbar
except ImportError:
Expand Down
10 changes: 5 additions & 5 deletions apps/users/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def get_email_confirmation_url(self, request, emailconfirmation):
def send_mail(self, template_prefix, email, context):
return UserAccountEmail.send(email, template_name=template_prefix, **context)

def get_email_confirmation_redirect_url(self, request):
if "next" in request.GET and url_has_allowed_host_and_scheme(
request.GET["next"], allowed_hosts=None
def get_email_verification_redirect_url(self, email_address):
if "next" in self.request.GET and url_has_allowed_host_and_scheme(
self.request.GET["next"], allowed_hosts=None
):
return request.GET["next"]
return self.request.GET["next"]
else:
return super().get_email_confirmation_redirect_url(request)
return super().get_email_verification_redirect_url(email_address)

def clean_username(self, username):
username = super().clean_username(username)
Expand Down
1 change: 1 addition & 0 deletions apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class User(auth_models.AbstractBaseUser, auth_models.PermissionsMixin):
objects = auth_models.UserManager()

USERNAME_FIELD = "username"
REQUIRED_FIELDS = ["email"]

def get_projects_follow_list(self, exclude_private_projects=False):
projects = Project.objects.filter(
Expand Down
19 changes: 15 additions & 4 deletions changelog/8102.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
### Removed

- unique email constraint
- add social account autoconnect to enable social account email connecting to existing regular account
- 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
- remove deprecated settings for account rate limits (removed in allauth v.0.61.0
- update to allauth v.0.62.0
- deprecated settings for account rate limits (removed in allauth v.0.61.0)

### Added

- social account autoconnect to enable social account email connecting to existing regular account
- dummy provider in dev settings for testing purposes
- templates for email verification, password reset, socialaccount login, authentication error, and dummy authentication to address the template changes of allauth v.0.58.0

### Changed

- inherited adapter's method from get_email_confirmation_redirect_url to get_email_verification_redirect_url

### Updated

- to latest allauth v.0.63.2
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redis==5.0.4

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

0 comments on commit dac79c4

Please sign in to comment.