1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00
This commit is contained in:
Ranjiwei
2025-03-31 09:53:39 +08:00
committed by GitHub
parent 2ed3b81934
commit 4ef9496557
2 changed files with 4 additions and 10 deletions

View File

@@ -1197,6 +1197,8 @@ SEAFILE_AI_SERVER_URL = os.environ.get('SEAFILE_AI_SERVER_URL', '') or SEAFILE_A
SEAFEVENTS_SERVER_URL = 'http://127.0.0.1:8889'
IS_PRO_VERSION = os.environ.get('IS_PRO_VERSION', 'false') == 'true'
CONSTANCE_ENABLED = ENABLE_SETTINGS_VIA_WEB
CONSTANCE_CONFIG = {
'DISABLE_SYNC_WITH_ANY_FOLDER': (DISABLE_SYNC_WITH_ANY_FOLDER, ''),

View File

@@ -77,16 +77,8 @@ else:
seafevents_api = RPCProxy()
def is_pro_version():
if seahub.settings.DEBUG:
if hasattr(seahub.settings, 'IS_PRO_VERSION') \
and seahub.settings.IS_PRO_VERSION:
return True
try:
return bool(seafevents_api.is_pro())
except AttributeError:
return False
return getattr(seahub.settings, 'IS_PRO_VERSION', False) is True
def is_cluster_mode():
cfg = configparser.ConfigParser()
if 'SEAFILE_CENTRAL_CONF_DIR' in os.environ: