diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 0e186726e..6664bd65d 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -267,7 +267,8 @@ class Config(dict): 'LANGUAGE_CODE': 'zh', 'TIME_ZONE': 'Asia/Shanghai', 'CHANGE_AUTH_PLAN_SECURE_MODE_ENABLED': True, - 'USER_LOGIN_SINGLE_MACHINE_ENABLED': False + 'USER_LOGIN_SINGLE_MACHINE_ENABLED': False, + 'TICKETS_ENABLED': True } def compatible_auth_openid_of_key(self): diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index 5149c3d9c..e30eae850 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -101,3 +101,5 @@ LOGO_URLS = DYNAMIC.LOGO_URLS CHANGE_AUTH_PLAN_SECURE_MODE_ENABLED = CONFIG.CHANGE_AUTH_PLAN_SECURE_MODE_ENABLED DATETIME_DISPLAY_FORMAT = '%Y-%m-%d %H:%M:%S' + +TICKETS_ENABLED = CONFIG.TICKETS_ENABLED diff --git a/apps/settings/api.py b/apps/settings/api.py index 2c7c31d13..c1692d329 100644 --- a/apps/settings/api.py +++ b/apps/settings/api.py @@ -279,6 +279,7 @@ class PublicSettingApi(generics.RetrieveAPIView): "SECURITY_MFA_VERIFY_TTL": settings.SECURITY_MFA_VERIFY_TTL, "SECURITY_COMMAND_EXECUTION": settings.SECURITY_COMMAND_EXECUTION, "LOGO_URLS": settings.LOGO_URLS, + "TICKETS_ENABLED": settings.TICKETS_ENABLED, "PASSWORD_RULE": { 'SECURITY_PASSWORD_MIN_LENGTH': settings.SECURITY_PASSWORD_MIN_LENGTH, 'SECURITY_PASSWORD_UPPER_CASE': settings.SECURITY_PASSWORD_UPPER_CASE,