perf: Remove unused CAS user exception handling and simplify login view error response (#16380)

* perf: Remove unused CAS user exception handling and simplify login view error response

* perf: position code

---------

Co-authored-by: wangruidong <940853815@qq.com>
Co-authored-by: Bai <baijiangjie@gmail.com>
This commit is contained in:
fit2bot
2025-12-04 17:49:58 +08:00
committed by GitHub
parent 065bfeda52
commit ba17863892
6 changed files with 18 additions and 62 deletions

View File

@@ -46,6 +46,10 @@ def _save_original_get_or_create():
_django_original_get_or_create = _save_original_get_or_create()
class OnlyAllowExistUserAuthError(Exception):
pass
def _authenticate_context(func):
"""
装饰器:管理 authenticate 函数的执行上下文
@@ -127,10 +131,6 @@ def _get_backends(return_tuples=False):
return backends
class OnlyAllowExistUserAuthError(Exception):
pass
auth._get_backends = _get_backends