Feature-Enforcement f�r Activity CSV-Import #37

Open
opened 2026-03-23 22:32:40 +01:00 by Lars · 0 comments
Owner

Priorit�t: Medium
Aufwand: 2-3h

Beschreibung

Activity CSV-Import (Apple Health) ist aktuell NICHT einschr�nkbar �ber das Feature-System. CSV-Import kann unbegrenzt Eintr�ge erstellen, Nutzer k�nnten Limits umgehen.

Problem

  • Endpoint: POST /api/activity/import-csv
  • Feature-ID: Keine (verwendet activity_entries nur f�r manuelle Eintr�ge)
  • Impact: Nutzer k�nnten Limits durch CSV-Import umgehen

L�sung

Backend

  1. Entscheiden: Separates Feature activity_import oder activity_entries erweitern?
  2. Bulk-Import-Logik: Limit-Check VOR Import oder Counter NACH Import?
  3. Endpoint erweitern:
    # In /api/activity/import-csv
    access = check_feature_access(pid, "activity_entries")
    if not access["allowed"]:
        raise HTTPException(403, detail="Activity Import limit reached")
    
    # Nach Import:
    increment_feature_usage(pid, "activity_entries", count=imported_count)
    

Frontend

  • Import-Zone deaktivieren oder nur Error-Message?
  • Usage-Badge auf Import-Panel hinzuf�gen
  • Alternativ: Nur Error-Message nach Versuch (aktuelles Verhalten)

Betroffene Dateien

  • backend/routers/activity.py (import-csv Endpoint)
  • frontend/src/pages/ActivityPage.jsx (Import UI)

Akzeptanzkriterien

  • CSV-Import respektiert Feature-Limit
  • UI zeigt Usage-Badge (optional)
  • Import-Zone deaktiviert bei Limit (optional)
  • Error-Message erkl�rt Problem

Quelle: .claude/docs/PENDING_FEATURES.md

**Priorit�t:** Medium **Aufwand:** 2-3h ## Beschreibung Activity CSV-Import (Apple Health) ist aktuell NICHT einschr�nkbar �ber das Feature-System. CSV-Import kann unbegrenzt Eintr�ge erstellen, Nutzer k�nnten Limits umgehen. ## Problem - **Endpoint:** `POST /api/activity/import-csv` - **Feature-ID:** Keine (verwendet `activity_entries` nur f�r manuelle Eintr�ge) - **Impact:** Nutzer k�nnten Limits durch CSV-Import umgehen ## L�sung ### Backend 1. Entscheiden: Separates Feature `activity_import` oder `activity_entries` erweitern? 2. Bulk-Import-Logik: Limit-Check VOR Import oder Counter NACH Import? 3. Endpoint erweitern: ```python # In /api/activity/import-csv access = check_feature_access(pid, "activity_entries") if not access["allowed"]: raise HTTPException(403, detail="Activity Import limit reached") # Nach Import: increment_feature_usage(pid, "activity_entries", count=imported_count) ``` ### Frontend - Import-Zone deaktivieren oder nur Error-Message? - Usage-Badge auf Import-Panel hinzuf�gen - Alternativ: Nur Error-Message nach Versuch (aktuelles Verhalten) ## Betroffene Dateien - `backend/routers/activity.py` (import-csv Endpoint) - `frontend/src/pages/ActivityPage.jsx` (Import UI) ## Akzeptanzkriterien - [ ] CSV-Import respektiert Feature-Limit - [ ] UI zeigt Usage-Badge (optional) - [ ] Import-Zone deaktiviert bei Limit (optional) - [ ] Error-Message erkl�rt Problem --- **Quelle:** `.claude/docs/PENDING_FEATURES.md`
Lars added the
feature
label 2026-03-23 22:32:40 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Lars/mitai-jinkendo#37
No description provided.