mirror of https://github.com/jumpserver/jumpserver
perf: ldap测试登录前端不需要先测试连接
parent
1569524583
commit
5755d281d7
|
@ -652,7 +652,7 @@ class LDAPTestUtil(object):
|
||||||
def _test_before_login_check(self, username, password):
|
def _test_before_login_check(self, username, password):
|
||||||
from settings.ws import CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS, TASK_STATUS_IS_OVER
|
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):
|
if not cache.get(CACHE_KEY_LDAP_TEST_CONFIG_TASK_STATUS):
|
||||||
raise self.LDAPBeforeLoginCheckError(_('Please test the connection first'))
|
self.test_config()
|
||||||
|
|
||||||
backend = LDAPAuthorizationBackend()
|
backend = LDAPAuthorizationBackend()
|
||||||
ok, msg = backend.pre_check(username, password)
|
ok, msg = backend.pre_check(username, password)
|
||||||
|
|
Loading…
Reference in New Issue