fix: 修复用户认证失败的详细信息显示 (#7886)

* fix: 修复用户认证失败的详细信息显示

* fix: 更新授权树翻译

Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com>
This commit is contained in:
fit2bot
2022-03-16 20:41:54 +08:00
committed by GitHub
parent 433d829c29
commit aa022a02c1
5 changed files with 56 additions and 16 deletions

View File

@@ -22,8 +22,10 @@ class JMSBaseAuthBackend:
Reject users with is_valid=False. Custom user models that don't have
that attribute are allowed.
"""
is_valid = getattr(user, 'is_valid', None)
return is_valid or is_valid is None
# 在 check_user_auth 中进行了校验,可以返回对应的错误信息
# is_valid = getattr(user, 'is_valid', None)
# return is_valid or is_valid is None
return True
# allow user to authenticate
def username_allow_authenticate(self, username):