Tags: server-side filtering

Aperta
#404 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start with auth/dependencies.py and the existing endpoint files in api/api_v1/endpoints/: sequences.py, sequence_annotations.py, detection_annotations.py, and sequence_groups.py. Trace how their queries and list totals are built, then check how usePipelineStats consumes those totals. Done means tag scope is applied across the listed screens and counters, full-access users still see everything, and tests cover all cases without visible queue slowdown.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

hackathon-theodo P1-high T4-26 topic: backend type: new feature

Context & Objective

A user only gets the alerts that carry one of their tags. No new endpoint: this issue adds a filter to the endpoints that already exist. Part of #400.

What is done currently

The list and detail endpoints return all the data to any logged-in user (sequences.py, sequence_annotations.py, detection_annotations.py, sequence_groups.py in api/api_v1/endpoints/). The dashboard counts come from the total of these list endpoints (usePipelineStats).

What has to be done

  1. One shared helper that adds the scope filter to a query for the current user, next to the existing auth dependencies (auth/dependencies.py). It is an indexed EXISTS on alert_tag ⨝ user_tag. For "full access" accounts it adds nothing.
  2. Apply it to each group of existing endpoints. Each line can be its own PR, or a sub-issue for the hackathon:
    • queues (classify, localize)
    • done pages and detail pages: opening an alert outside your scope by its id returns 404
    • groups: only the sequences in scope are shown and labelled (see #401)
    • counters and dashboard: the dashboard follows the list endpoints; GET /sequence_groups/stats needs the filter too

Images are not filtered for now (decided in #401). The export (/export/alerts) stays for full-access accounts.

Done when

  • A user without a tag sees nothing
  • A user with a tag sees only the alerts of that tag, on every screen and in every counter
  • A user with full access sees everything
  • Tests cover these cases; no visible slowdown on the queues

Theme Dataset · Priority P1 (high) · Period T4-26

Lingua principale
TypeScript
Stelle
0
Fork
1
Merge medio
2g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pyronear/pyro-annotator

Tutte le issue di pyronear/pyro-annotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.