v1.9.0: Phase 0 — инфраструктура CRM/лидов, миграции БД, расширение моделей

This commit is contained in:
2026-06-04 14:38:43 +03:00
parent e29e2984da
commit f06ecaabe3
15 changed files with 3315 additions and 10 deletions
+4 -4
View File
@@ -153,8 +153,8 @@ async def tech_access_page(
db: AsyncSession = Depends(get_db),
user: dict = Depends(get_current_user),
):
if user["role"] != "engineer":
return HTMLResponse(content="Доступ только для инженеров", status_code=403)
if user["role"] not in ("engineer", "owner"):
return HTMLResponse(content="Доступ только для инженеров и руководителей", status_code=403)
perms = discover_docs()
editable_docs = [
@@ -170,8 +170,8 @@ async def tech_access_update(
db: AsyncSession = Depends(get_db),
user: dict = Depends(get_current_user),
):
if user["role"] != "engineer":
return HTMLResponse(content="Доступ только для инженеров", status_code=403)
if user["role"] not in ("engineer", "owner"):
return HTMLResponse(content="Доступ только для инженеров и руководителей", status_code=403)
form = await request.form()
perms = discover_docs()