Fix: default admin tenant (#12964)

### What problem does this PR solve?

Add tenant for default admin, and allow login to ragflow server as
default admin.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2026-02-03 15:37:36 +08:00
committed by GitHub
parent f11ca54e0e
commit 32f9a87b2e
2 changed files with 39 additions and 3 deletions

View File

@ -98,9 +98,7 @@ async def login():
return get_json_result(data=False, code=RetCode.AUTHENTICATION_ERROR, message="Unauthorized!")
email = json_body.get("email", "")
if email == "admin@ragflow.io":
return get_json_result(data=False, code=RetCode.AUTHENTICATION_ERROR, message="Default admin account cannot be used to login normal services!")
users = UserService.query(email=email)
if not users:
return get_json_result(