Add mc_is_infrastructure flag and feeder/admin CRUD for MeshCore infra nodes

Abierto
#367 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
django, python

Línea de trabajo

Start with the ObservedNode model and its migrations, then the infrastructure action on the observed-nodes endpoint (GET /api/nodes/observed-nodes/infrastructure/), which currently filters only on protocol for MeshCore. Add mc_is_infrastructure as a default-False field, filter MeshCore results on it, and gate writes to the feeder group or is_staff, documenting the rules in docs/permissions/README.md and openapi.yaml. Done when only flagged MeshCore nodes are returned, non-feeder users get 403 on writes, and Meshtastic infrastructure output is unchanged.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement meshcore

Summary

MeshCore infrastructure listing should not return every observed MC node. Add an explicit operator-controlled flag on ObservedNode and tighten the infrastructure endpoint.

UI tracking: meshflow-ui#307

Background

GET /api/nodes/observed-nodes/infrastructure/?protocol=meshcore currently returns all protocol=MESHCORE rows in the time window. Meshtastic infra correctly uses meshtastic_role ∈ INFRASTRUCTURE_ROLES. MeshCore has no equivalent role model; filtering by repeater/type alone is too loose.

Design

ObservedNode.mc_is_infrastructure
  • BooleanField, default=False
  • Meaningful only for protocol=MESHCORE; ignore or reject writes on Meshtastic rows
  • Does not replace MT infrastructure semantics
Infrastructure list
  • protocol=meshtastic (default): unchanged (protocol=MESHTASTIC + infrastructure roles)
  • protocol=meshcore: protocol=MESHCORE and mc_is_infrastructure=True
Write API
  • Expose on observed-node PATCH and/or dedicated action (e.g. POST …/observed-nodes/{id}/set-mc-infrastructure/)
  • Permissions: Django feeder group or is_staff only; deny for plain authenticated users
  • Document in docs/permissions/README.md and openapi.yaml

Tasks

  • Migration + model field
  • Serializer(s) + validation (MC only)
  • Permission class / object checks
  • Update infrastructure action filter for meshcore
  • Unit tests (permissions + queryset)
  • Optional: admin list filter

Acceptance criteria

  1. Only flagged MC nodes appear in meshcore infrastructure API results.
  2. Non-feeder non-admin users receive 403 on flag writes.
  3. MT infrastructure list unchanged.
Lenguaje dominante
Python
Estrellas
1
Forks
0
Merge medio
1 d 20 h
PR fusionados (30 d)
5

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pskillen/meshflow-api

Todos los issues de pskillen/meshflow-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.