feat: документация из Nextcloud, график у сотрудника, автоочистка фото, мониторинг, итог мастера, фильтр по местам; доп. сервисы в docker-compose
- docker-compose.yml: профили docs (Nextcloud), office (ONLYOFFICE Document Server), ai (Ollama + скачивание модели) - автонастройка: адреса Nextcloud, ONLYOFFICE, портала и модели подставляются из .env или по именам сервисов во внутренней сети Docker; значения из интерфейса важнее - локальная модель в своей сети (имя сервиса, частный IP) подключается без ключа API - .env.example, docs/DEPLOY.md (раздел 7а), README
This commit is contained in:
@@ -190,6 +190,7 @@ def me(db: Session = Depends(get_db), u: User = Depends(current_user)):
|
||||
out.crane_map = scope.crane_map_enabled(db)
|
||||
from ..security import is_engineer, is_manager
|
||||
out.reliability = ss.get(db, "reliability") != "0" and (is_manager(u) or is_engineer(u))
|
||||
out.docs = bool(ss.get(db, "nc_url") and ss.get(db, "nc_user") and ss.get(db, "nc_password")) # документация из Nextcloud подключена
|
||||
return out
|
||||
|
||||
|
||||
@@ -357,6 +358,8 @@ def check_user_refs(db: Session, fields: dict):
|
||||
raise HTTPException(422, "Отдел не найден")
|
||||
if fields.get("position_id") and not db.get(Position, fields["position_id"]):
|
||||
raise HTTPException(422, "Должность не найдена")
|
||||
if fields.get("schedule_id") and not db.get(ShiftSchedule, fields["schedule_id"]):
|
||||
raise HTTPException(422, "График не найден")
|
||||
|
||||
|
||||
def guard_user_edit(me: User, target: User | None, fields: dict):
|
||||
|
||||
Reference in New Issue
Block a user