169 build - mapping и карьерная статистика
This commit is contained in:
4
app.py
4
app.py
@@ -35,7 +35,7 @@ from khl_site.khl_data_center import APP as khl_site_app, configure_storage, syn
|
||||
from hockey_data.khl_career import KhlCareerService
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
BUILD_VERSION = "2026.09.29.5"
|
||||
BUILD_VERSION = "2026.09.29.6"
|
||||
# compatibility: BUILD_VERSION = "2026.09.24.2"
|
||||
# compatibility: BUILD_VERSION = "2026.09.23.8"
|
||||
# compatibility: BUILD_VERSION = "2026.09.23.7"
|
||||
@@ -216,7 +216,7 @@ async def hockey_runtime_auth(request: Request, call_next):
|
||||
if path in {"/", "/editor"}:
|
||||
return RedirectResponse("/login?reason=expired", status_code=303)
|
||||
return JSONResponse({"detail": "Требуется вход"}, status_code=401)
|
||||
if (khl_admin_path or editor_path) and not user.is_admin:
|
||||
if (editor_path or (khl_admin_path and request.method not in {"GET", "HEAD"})) and not user.is_admin:
|
||||
if path == "/editor":
|
||||
return RedirectResponse("/", status_code=303)
|
||||
return JSONResponse({"detail": "Раздел доступен только администратору"}, status_code=403)
|
||||
|
||||
Reference in New Issue
Block a user