fix(tradein/auth): убрать устаревшее «Caddy basic_auth required» из 401 (#2573) (#2649)
All checks were successful
Deploy Trade-In / changes (push) Successful in 9s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-browser (push) Has been skipped
Deploy Trade-In / test (push) Successful in 2m38s
Deploy Trade-In / build-backend (push) Successful in 58s
Deploy Trade-In / deploy (push) Successful in 1m6s
All checks were successful
Deploy Trade-In / changes (push) Successful in 9s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-browser (push) Has been skipped
Deploy Trade-In / test (push) Successful in 2m38s
Deploy Trade-In / build-backend (push) Successful in 58s
Deploy Trade-In / deploy (push) Successful in 1m6s
This commit is contained in:
parent
90332e9827
commit
ac0c472faf
3 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue