diff --git a/src/app/settings.py b/src/app/settings.py index 14c4af8..0328933 100644 --- a/src/app/settings.py +++ b/src/app/settings.py @@ -110,6 +110,10 @@ AUTHENTICATION_BACKENDS = [ "allauth.account.auth_backends.AuthenticationBackend", ] +ACCOUNT_ADAPTER = "shared.account.AccountAdapter" +ACCOUNT_CHANGE_EMAIL = True +ACCOUNT_EMAIL_NOTIFICATIONS = True + SOCIALACCOUNT_ONLY = True SOCIALACCOUNT_PROVIDERS = { "openid_connect": { diff --git a/src/shared/account.py b/src/shared/account.py new file mode 100644 index 0000000..544fcd4 --- /dev/null +++ b/src/shared/account.py @@ -0,0 +1,10 @@ +from allauth.account.adapter import DefaultAccountAdapter + + +class AccountAdapter(DefaultAccountAdapter): + """ + Overrides the Account Adapter. + """ + + def is_open_for_signup(self, request): + return False diff --git a/src/shared/templates/allauth/layouts/base.html b/src/shared/templates/allauth/layouts/base.html index 3746ddc..eb6082e 100644 --- a/src/shared/templates/allauth/layouts/base.html +++ b/src/shared/templates/allauth/layouts/base.html @@ -16,56 +16,6 @@ {% include "_hero.html" %}
- - -
-
{% block content %} {% endblock content %}