[Fixes #107] Invitation only Sign Ups
parent
d8bab0ac96
commit
21ba8b8892
|
@ -19,7 +19,6 @@ THIRD_PARTY_APPS = (
|
|||
'crispy_forms',
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
)
|
||||
LOCAL_APPS = (
|
||||
'network.users',
|
||||
|
@ -109,6 +108,7 @@ AUTHENTICATION_BACKENDS = (
|
|||
'django.contrib.auth.backends.ModelBackend',
|
||||
'allauth.account.auth_backends.AuthenticationBackend',
|
||||
)
|
||||
ACCOUNT_ADAPTER = 'network.users.adapter.NoSignupsAdapter'
|
||||
ACCOUNT_AUTHENTICATION_METHOD = 'username'
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
|
||||
|
|
|
@ -2,14 +2,18 @@
|
|||
|
||||
{% load url from future %}
|
||||
|
||||
{% block head_title %}Sign Up Closed{% endblock %}
|
||||
{% block head_title %}Invitation only Sign Ups{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2>Sign Up Closed</h2>
|
||||
<p>We are sorry, but the sign up is currently closed.</p>
|
||||
<h2>Invitation only Sign Ups</h2>
|
||||
<p>SatNOGS Network is currently on Alpha state.</p>
|
||||
<p>
|
||||
You can though request an account on our
|
||||
<a href="https://community.satnogs.org/" target="_blank">Community forum</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
from allauth.account.adapter import DefaultAccountAdapter
|
||||
|
||||
|
||||
class NoSignupsAdapter(DefaultAccountAdapter):
|
||||
def is_open_for_signup(self, request):
|
||||
return False
|
Loading…
Reference in New Issue