mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 09:51:00 +00:00
feat: 添加限制用户只能从source登录的功能 (#5592)
* stash it * feat: 添加限制用户只能从source登录的功能 * fix: 修复小错误 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -90,7 +90,7 @@ class Setting(models.Model):
|
||||
setting = cls.objects.filter(name='AUTH_LDAP').first()
|
||||
if not setting:
|
||||
return
|
||||
ldap_backend = 'authentication.backends.ldap.LDAPAuthorizationBackend'
|
||||
ldap_backend = settings.AUTH_BACKEND_LABEL_MAPPING['ldap']
|
||||
backends = settings.AUTHENTICATION_BACKENDS
|
||||
has = ldap_backend in backends
|
||||
if setting.cleaned_value and not has:
|
||||
|
Reference in New Issue
Block a user