change status

This commit is contained in:
2023-10-22 18:58:35 +02:00
parent 76a4680622
commit e12c1c91b3
4 changed files with 15 additions and 20 deletions

View File

@@ -70,6 +70,6 @@ async def get_current_user(token_str: Annotated[str, Depends(oauth2_scheme)]):
async def get_current_active_user(
current_user: Annotated[users.User, Depends(get_current_user)]
):
if current_user.disabled:
if current_user.status == 0:
raise HTTPException(status_code=400, detail="Inactive user")
return current_user