[Bugfix] 解决下载导入模版时KeyError的问题(数据为空时) (#3017)

* [Bugfix] 解决下载导入模版时KeyError的问题(数据为空时)

* [Bugfix] 解决下载导入模版时KeyError的问题(数据为空时)2

* [Bugfix] 解决下载导入模版时KeyError的问题(数据为空时)3

* [Update] 解决LDAP用户禁用后,终端还可以登录成功一次的问题

* [Update] 解决LDAP用户禁用后,终端还可以登录成功一次的问题2

* [Update] LDAP AD Server可以通过UserAccountControl映射is_active字段

* [Update] 限制只有local用户可以更新ssh key

* [Update] 限制只有local用户可以更新ssh key 2
This commit is contained in:
BaiJiangJie
2019-07-24 12:50:39 +08:00
committed by 老广
parent 421e98696c
commit c929c1a87e
19 changed files with 338 additions and 264 deletions

View File

@@ -54,6 +54,9 @@ class AuthMixin:
def can_update_password(self):
return self.is_local
def can_update_ssh_key(self):
return self.is_local
def check_otp(self, code):
from ..utils import check_otp_code
return check_otp_code(self.otp_secret_key, code)