mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
[Issue #47] Enable signup on seahub.
This commit is contained in:
@@ -6,7 +6,8 @@ and returns a dictionary to add to the context.
|
||||
These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by
|
||||
RequestContext.
|
||||
"""
|
||||
from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE
|
||||
from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE, \
|
||||
ENABLE_SIGNUP
|
||||
try:
|
||||
from settings import BUSINESS_MODE
|
||||
except ImportError:
|
||||
@@ -34,5 +35,6 @@ def base(request):
|
||||
'org': org,
|
||||
'base_template': base_template,
|
||||
'site_name': SITE_NAME,
|
||||
'enable_signup': ENABLE_SIGNUP,
|
||||
}
|
||||
|
||||
|
@@ -34,7 +34,9 @@ try:
|
||||
from settings import CLOUD_MODE
|
||||
except ImportError:
|
||||
CLOUD_MODE = False
|
||||
if CLOUD_MODE:
|
||||
from settings import ENABLE_SIGNUP
|
||||
|
||||
if CLOUD_MODE or ENABLE_SIGNUP:
|
||||
urlpatterns += patterns('',
|
||||
url(r'^register/$',
|
||||
register,
|
||||
|
@@ -194,6 +194,9 @@ SITE_NAME = 'Seafile'
|
||||
# server.
|
||||
SERVE_STATIC = True
|
||||
|
||||
# Enalbe or disalbe registration on web.
|
||||
ENABLE_SIGNUP = False
|
||||
|
||||
try:
|
||||
import local_settings
|
||||
except ImportError:
|
||||
|
@@ -64,7 +64,7 @@
|
||||
<a href="{{ SITE_ROOT }}accounts/logout/">{% trans "Log out" %}</a>
|
||||
{% else %}
|
||||
<a href="{{ SITE_ROOT }}accounts/login/">{% trans "Log In" %}</a>
|
||||
{% if cloud_mode %}
|
||||
{% if cloud_mode or enable_signup %}
|
||||
<a href="{{ SITE_ROOT }}accounts/register/">{% trans "Signup" %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user