mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-04 17:45:07 +08:00
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:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user