funkwhale/api/funkwhale_api/users/adapters.py

16 wiersze
368 B
Python
Czysty Zwykły widok Historia

from allauth.account.adapter import DefaultAccountAdapter
from django.conf import settings
class FunkwhaleAccountAdapter(DefaultAccountAdapter):
def is_open_for_signup(self, request):
if settings.REGISTRATION_MODE == "disabled":
return False
if settings.REGISTRATION_MODE == "public":
return True
return False