perf: ldap测试登录提示优化&上产文件名长度限制

This commit is contained in:
wangruidong
2023-12-15 17:10:51 +08:00
committed by Bryan
parent d92736e624
commit 6955a3db11
3 changed files with 5 additions and 5 deletions

View File

@@ -649,7 +649,7 @@ class LDAPTestUtil(object):
def _test_before_login_check(self, username, password):
from settings.ws import CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS, TASK_STATUS_IS_OVER
if cache.get(CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS) != TASK_STATUS_IS_OVER:
if not cache.get(CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS):
raise self.LDAPBeforeLoginCheckError(_('Please test the connection first'))
backend = LDAPAuthorizationBackend()