mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
Disable signup when not in cloud_mode
This commit is contained in:
@@ -27,6 +27,15 @@ urlpatterns = patterns('',
|
||||
activate,
|
||||
{ 'backend': 'seahub.base.accounts.RegistrationBackend', },
|
||||
name='registration_activate'),
|
||||
(r'', include('registration.auth_urls')),
|
||||
)
|
||||
|
||||
try:
|
||||
from settings import CLOUD_MODE
|
||||
except ImportError:
|
||||
CLOUD_MODE = False
|
||||
if CLOUD_MODE:
|
||||
urlpatterns += patterns('',
|
||||
url(r'^register/$',
|
||||
register,
|
||||
reg_dict,
|
||||
@@ -40,5 +49,5 @@ urlpatterns = patterns('',
|
||||
direct_to_template,
|
||||
{ 'template': 'registration/registration_closed.html' },
|
||||
name='registration_disallowed'),
|
||||
(r'', include('registration.auth_urls')),
|
||||
)
|
||||
|
||||
|
@@ -62,8 +62,10 @@
|
||||
<a href="{{ SITE_ROOT }}accounts/logout/">{% trans "Log out" %}</a>
|
||||
{% else %}
|
||||
<a href="{{ SITE_ROOT }}accounts/login/">{% trans "Log In" %}</a>
|
||||
{% if cloud_mode %}
|
||||
<a href="{{ SITE_ROOT }}accounts/register/">{% trans "Signup" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="#" id="lang-context" data="no-popup" data-lang="{{ LANGUAGE_CODE }}">
|
||||
{{ LANGUAGE_CODE|language_name_local }}
|
||||
<span class="tri-bg tri-down-bg"></span>
|
||||
@@ -73,7 +75,7 @@
|
||||
<li><a href="{% url 'i18n' %}?lang={{ LANG.0 }}">{{ LANG.1 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div> <!-- /.account -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user