From 76ac0215fe9c0018567156159d2b6ca030438d7f Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 26 Feb 2020 16:12:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[update]=20=E4=BF=AE=E5=A4=8D=E8=8E=B7?= =?UTF-8?q?=E5=8F=96settings=E6=9C=89=E9=97=AE=E9=A2=98=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/settings/custom.py | 1 + apps/settings/api.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index 0a910f984..ef768a56b 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -82,3 +82,4 @@ USER_GUIDE_URL = DYNAMIC.USER_GUIDE_URL HTTP_LISTEN_PORT = CONFIG.HTTP_LISTEN_PORT WS_LISTEN_PORT = CONFIG.WS_LISTEN_PORT LOGIN_LOG_KEEP_DAYS = DYNAMIC.LOGIN_LOG_KEEP_DAYS +WINDOWS_SKIP_ALL_MANUAL_PASSWORD = CONFIG.WINDOWS_SKIP_ALL_MANUAL_PASSWORD diff --git a/apps/settings/api.py b/apps/settings/api.py index 354cbdd1d..0346c3135 100644 --- a/apps/settings/api.py +++ b/apps/settings/api.py @@ -250,11 +250,10 @@ class PublicSettingApi(generics.RetrieveAPIView): serializer_class = PublicSettingSerializer def get_object(self): - c = settings.CONFIG instance = { "data": { - "WINDOWS_SKIP_ALL_MANUAL_PASSWORD": c.WINDOWS_SKIP_ALL_MANUAL_PASSWORD, - "SECURITY_MAX_IDLE_TIME": c.SECURITY_MAX_IDLE_TIME, + "WINDOWS_SKIP_ALL_MANUAL_PASSWORD": settings.WINDOWS_SKIP_ALL_MANUAL_PASSWORD, + "SECURITY_MAX_IDLE_TIME": settings.SECURITY_MAX_IDLE_TIME, } } return instance From c354b55f616809ed2bf1387dec53b50c3f1a727a Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 26 Feb 2020 16:12:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[update]=20=E4=BF=AE=E5=A4=8D=E8=8E=B7?= =?UTF-8?q?=E5=8F=96settings=E6=9C=89=E9=97=AE=E9=A2=98=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/api.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/settings/api.py b/apps/settings/api.py index 0346c3135..025db8ae8 100644 --- a/apps/settings/api.py +++ b/apps/settings/api.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- # -import os import json -import jms_storage from smtplib import SMTPSenderRefused from rest_framework import generics @@ -12,7 +10,6 @@ from django.conf import settings from django.core.mail import send_mail from django.utils.translation import ugettext_lazy as _ -from .models import Setting from .utils import ( LDAPServerUtil, LDAPCacheUtil, LDAPImportUtil, LDAPSyncUtil, LDAP_USE_CACHE_FLAGS