Fixes for http_enabled.
This commit is contained in:
@@ -35,7 +35,7 @@ async def get_current_http_user(credentials: HTTPBasicCredentials = Depends(secu
|
||||
headers={"WWW-Authenticate": "Basic"},
|
||||
)
|
||||
|
||||
if not user.enabled:
|
||||
if not user.http_enabled:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="HTTP access disabled for this user",
|
||||
|
||||
@@ -23,7 +23,7 @@ async def profile(current_user: HttpUser = Depends(get_current_http_user)):
|
||||
|
||||
return {
|
||||
**safe_profile,
|
||||
"http_enabled": current_user.enabled,
|
||||
"http_enabled": current_user.http_enabled,
|
||||
"rf_enabled": rf_enabled,
|
||||
"http_created_at": current_user.created_at,
|
||||
"http_last_login": current_user.last_login,
|
||||
|
||||
Reference in New Issue
Block a user