On 7/30/25 16:10, Mark wrote:

Disabling the Account "Sign-up" globally can be done by adding the following to "/etc/mailman3/settings.py".

ACCOUNT_ADAPTER = 'django_mailman3.views.user_adapter.DisableSignupAdapter'

I have several domains on the server. Is it possible to disable the Sign-up for only one of the domains ?

Anything is possible, it's only code ;)

You could make your own user_adapter.py which is modified like
```
--- a/django_mailman3/views/user_adapter.py
+++ b/django_mailman3/views/user_adapter.py
@@ -31,7 +31,10 @@ class DisableSignupAdapter(DefaultAccountAdapter):
     """

     def is_open_for_signup(self, req):
-        return False
+        if req.META.HTTP_HOST == 'the.domain':
+            return False
+        else:
+            return super().is_open_for_signup(self, req)


 class EnableSocialSignupAdapter(DefaultSocialAccountAdapter):
```
and set that as the ACCOUNT_ADAPTER. This depends on whatever is proxying to Django setting the appropriate HTTP_HOST header.

--
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org
To unsubscribe send an email to mailman-users-le...@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at: 
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/U3MFZBBDVBE3QGG65QQ3LVQKBGPXM26X/

This message sent to arch...@mail-archive.com

Reply via email to