fix(tradein/auth): убрать устаревшее «Caddy basic_auth required» из 401 (#2573) #2649

Merged
bot-backend merged 1 commit from fix/tradein-401-wording into main 2026-08-05 08:45:57 +00:00
3 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ async def me(
if not x_authenticated_user:
raise HTTPException(
status_code=401,
detail="no authenticated user (Caddy basic_auth required)",
detail="no authenticated user (valid session required)",
)
try:
return get_user_scope(x_authenticated_user)

View file

@ -63,7 +63,7 @@ def _assert_estimate_access(created_by: str | None, x_authenticated_user: str |
if not x_authenticated_user:
raise HTTPException(
status_code=401,
detail="no authenticated user (Caddy basic_auth required)",
detail="no authenticated user (valid session required)",
)
from app.core.auth import get_role
@ -688,7 +688,7 @@ def estimate_history(
if not x_authenticated_user:
raise HTTPException(
status_code=401,
detail="no authenticated user (Caddy basic_auth required)",
detail="no authenticated user (valid session required)",
)
from app.core.auth import get_role

View file

@ -222,7 +222,7 @@ async def rbac_guard(
if not username:
return JSONResponse(
status_code=401,
content={"detail": "no authenticated user (Caddy basic_auth required)"},
content={"detail": "no authenticated user (valid session required)"},
)
# #2213 defense-in-depth: если общий секрет задан — запрос с X-Authenticated-User