Merge pull request #6838 from jumpserver/dev

v2.14.0 rc2
pull/6892/head
Jiangjie.Bai 2021-09-14 00:05:35 +08:00 committed by GitHub
commit 683fb9f596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -105,13 +105,13 @@ class Setting(models.Model):
# 添加
if setting.cleaned_value and not has:
logger.debug('Add auth backend: ', name)
logger.debug('Add auth backend: {}'.format(name))
settings.AUTHENTICATION_BACKENDS.insert(0, backend)
# 去掉
if not setting.cleaned_value and has:
index = auth_backends.index(backend)
logger.debug('Pop auth backend: ', name)
logger.debug('Pop auth backend: {}'.format(name))
auth_backends.pop(index)
# 设置内存值