mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
[settings] Update pub repo creation and sync with folder
This commit is contained in:
@@ -267,6 +267,11 @@ FORCE_SERVER_CRYPTO = True
|
|||||||
# Enable or disable repo history setting
|
# Enable or disable repo history setting
|
||||||
ENABLE_REPO_HISTORY_SETTING = True
|
ENABLE_REPO_HISTORY_SETTING = True
|
||||||
|
|
||||||
|
# Enable or disable org repo creation by user
|
||||||
|
ENABLE_USER_CREATE_ORG_REPO = True
|
||||||
|
|
||||||
|
DISABLE_SYNC_WITH_ANY_FOLDER = False
|
||||||
|
|
||||||
# File preview
|
# File preview
|
||||||
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
|
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
|
||||||
OFFICE_PREVIEW_MAX_SIZE = 2 * 1024 * 1024
|
OFFICE_PREVIEW_MAX_SIZE = 2 * 1024 * 1024
|
||||||
@@ -613,13 +618,13 @@ INNER_FILE_SERVER_ROOT = 'http://127.0.0.1:' + FILE_SERVER_PORT
|
|||||||
CONSTANCE_CONFIG = {
|
CONSTANCE_CONFIG = {
|
||||||
'SERVICE_URL': (SERVICE_URL,''),
|
'SERVICE_URL': (SERVICE_URL,''),
|
||||||
'FILE_SERVER_ROOT': (FILE_SERVER_ROOT,''),
|
'FILE_SERVER_ROOT': (FILE_SERVER_ROOT,''),
|
||||||
'DISABLE_SYNC_WITH_ANY_FOLDER': (False,''),
|
'DISABLE_SYNC_WITH_ANY_FOLDER': (DISABLE_SYNC_WITH_ANY_FOLDER,''),
|
||||||
|
|
||||||
'ENABLE_SIGNUP': (ENABLE_SIGNUP,''),
|
'ENABLE_SIGNUP': (ENABLE_SIGNUP,''),
|
||||||
'ACTIVATE_AFTER_REGISTRATION': (ACTIVATE_AFTER_REGISTRATION,''),
|
'ACTIVATE_AFTER_REGISTRATION': (ACTIVATE_AFTER_REGISTRATION,''),
|
||||||
'REGISTRATION_SEND_MAIL': (REGISTRATION_SEND_MAIL ,''),
|
'REGISTRATION_SEND_MAIL': (REGISTRATION_SEND_MAIL ,''),
|
||||||
'LOGIN_REMEMBER_DAYS': (LOGIN_REMEMBER_DAYS,''),
|
'LOGIN_REMEMBER_DAYS': (LOGIN_REMEMBER_DAYS,''),
|
||||||
'ENABLE_ORGANIZATION_LIBRARY': (True, ''),
|
'ENABLE_USER_CREATE_ORG_REPO': (ENABLE_USER_CREATE_ORG_REPO, ''),
|
||||||
|
|
||||||
'ENABLE_ENCRYPTED_LIBRARY': (ENABLE_ENCRYPTED_LIBRARY,''),
|
'ENABLE_ENCRYPTED_LIBRARY': (ENABLE_ENCRYPTED_LIBRARY,''),
|
||||||
'REPO_PASSWORD_MIN_LENGTH': (REPO_PASSWORD_MIN_LENGTH,''),
|
'REPO_PASSWORD_MIN_LENGTH': (REPO_PASSWORD_MIN_LENGTH,''),
|
||||||
|
@@ -69,10 +69,6 @@
|
|||||||
{% include "snippets/web_settings_form.html" %}
|
{% include "snippets/web_settings_form.html" %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
{% with type="checkbox" setting_display_name="organization library" help_tip="Allow user to add organization library. If unchecked, only system admin can add library." setting_name="ENABLE_ORGANIZATION_LIBRARY" setting_val=config_dict.ENABLE_ORGANIZATION_LIBRARY %}
|
|
||||||
{% include "snippets/web_settings_form.html" %}
|
|
||||||
{% endwith %}
|
|
||||||
|
|
||||||
{% with type="input" setting_display_name="library password minimum length" help_tip="The least number of characters an encrypted library password should include." setting_name="REPO_PASSWORD_MIN_LENGTH" setting_val=config_dict.REPO_PASSWORD_MIN_LENGTH %}
|
{% with type="input" setting_display_name="library password minimum length" help_tip="The least number of characters an encrypted library password should include." setting_name="REPO_PASSWORD_MIN_LENGTH" setting_val=config_dict.REPO_PASSWORD_MIN_LENGTH %}
|
||||||
{% include "snippets/web_settings_form.html" %}
|
{% include "snippets/web_settings_form.html" %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
@@ -83,6 +79,12 @@
|
|||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{% with type="checkbox" setting_display_name="ENABLE_USER_CREATE_ORG_REPO" help_tip="Allow user to add organization library. If unchecked, only system admin can add library." setting_name="ENABLE_USER_CREATE_ORG_REPO" setting_val=config_dict.ENABLE_USER_CREATE_ORG_REPO %}
|
||||||
|
{% include "snippets/web_settings_form.html" %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4>Sync</h4>
|
<h4>Sync</h4>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
@@ -1318,4 +1318,4 @@ def is_org_repo_creation_allowed(request):
|
|||||||
if request.user.is_staff:
|
if request.user.is_staff:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return config.ENABLE_ORGANIZATION_LIBRARY
|
return config.ENABLE_USER_CREATE_ORG_REPO
|
||||||
|
@@ -2150,7 +2150,7 @@ def sys_settings(request):
|
|||||||
'ENABLE_REPO_HISTORY_SETTING', 'USER_STRONG_PASSWORD_REQUIRED',
|
'ENABLE_REPO_HISTORY_SETTING', 'USER_STRONG_PASSWORD_REQUIRED',
|
||||||
'ENABLE_ENCRYPTED_LIBRARY', 'USER_PASSWORD_MIN_LENGTH',
|
'ENABLE_ENCRYPTED_LIBRARY', 'USER_PASSWORD_MIN_LENGTH',
|
||||||
'USER_PASSWORD_STRENGTH_LEVEL', 'SHARE_LINK_PASSWORD_MIN_LENGTH',
|
'USER_PASSWORD_STRENGTH_LEVEL', 'SHARE_LINK_PASSWORD_MIN_LENGTH',
|
||||||
'ENABLE_ORGANIZATION_LIBRARY'
|
'ENABLE_USER_CREATE_ORG_REPO'
|
||||||
)
|
)
|
||||||
|
|
||||||
STRING_WEB_SETTINGS = ('SERVICE_URL', 'FILE_SERVER_ROOT',)
|
STRING_WEB_SETTINGS = ('SERVICE_URL', 'FILE_SERVER_ROOT',)
|
||||||
|
Reference in New Issue
Block a user