perf: ldap测试登录前端不需要先测试连接

pull/13040/head
wangruidong 2024-04-16 18:07:06 +08:00 committed by w940853815
parent 1569524583
commit 5755d281d7
1 changed files with 1 additions and 1 deletions

View File

@ -652,7 +652,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 not cache.get(CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS):
raise self.LDAPBeforeLoginCheckError(_('Please test the connection first'))
self.test_config()
backend = LDAPAuthorizationBackend()
ok, msg = backend.pre_check(username, password)