diff --git a/changelog/8450.md b/changelog/8450.md new file mode 100644 index 0000000000..e4c54fe982 --- /dev/null +++ b/changelog/8450.md @@ -0,0 +1,5 @@ +### Changed + +- update django-allauth to 65.x +- rename and adapt `get_email_confirmation_redirect_url` to `get_email_verification_redirect_url` +- update django-allauth settings to the new style diff --git a/meinberlin/apps/users/adapters.py b/meinberlin/apps/users/adapters.py index 86718bdf5a..9e79dd934d 100644 --- a/meinberlin/apps/users/adapters.py +++ b/meinberlin/apps/users/adapters.py @@ -46,13 +46,13 @@ def send_mail(self, template_prefix, email, context): context.update({"email": email}) 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) diff --git a/meinberlin/config/settings/base.py b/meinberlin/config/settings/base.py index 5dd29174f8..e07af38180 100644 --- a/meinberlin/config/settings/base.py +++ b/meinberlin/config/settings/base.py @@ -271,7 +271,7 @@ ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True ACCOUNT_LOGIN_ON_PASSWORD_RESET = True ACCOUNT_USERNAME_REQUIRED = True -ACCOUNT_PREVENT_ENUMERATION = True +ACCOUNT_PREVENT_ENUMERATION = "strict" SOCIALACCOUNT_AUTO_SIGNUP = False SOCIALACCOUNT_EMAIL_VERIFICATION = "none" SOCIALACCOUNT_FORMS = {"signup": "meinberlin.apps.users.forms.SocialTermsSignupForm"} diff --git a/package.json b/package.json index da4b9593e5..3b07287c28 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@maplibre/maplibre-gl-leaflet": "0.0.22", "@react-leaflet/core": "^2.1.0", "acorn": "8.14.0", - "adhocracy4": "liqd/adhocracy4#69c811feb292cd2a2bfacdccd1a3ded61ed9e34a", + "adhocracy4": "liqd/adhocracy4#b0b67928e4e283188f7ddab06b946edb68070439", "autoprefixer": "10.4.20", "bootstrap": "5.2.3", "copy-webpack-plugin": "12.0.2", diff --git a/requirements/base.txt b/requirements/base.txt index 6431c4fc17..8c1c339aa6 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # A4 -git+https://github.com/liqd/adhocracy4.git@69c811feb292cd2a2bfacdccd1a3ded61ed9e34a#egg=adhocracy4 +git+https://github.com/liqd/adhocracy4.git@b0b67928e4e283188f7ddab06b946edb68070439#egg=adhocracy4 # Additional requirements beautifulsoup4==4.12.3 @@ -17,7 +17,7 @@ zeep==4.2.1 # Inherited a4-core requirements celery==5.4.0 -django-allauth==0.61.1 +django-allauth==65.3.0 django-autoslug==1.9.9 django-ckeditor==6.7.1 https://github.com/liqd/django-ckeditor-5/releases/download/v0.2.13-liqd/django_ckeditor_5-0.2.13-py3-none-any.whl