Skip to content

View/download counters and download terms modal #1507

Description

@NishaSharma14

Describe the issue
This feature request tracks the implementation of view/download counters and a download terms modal, as outlined in PR #1468.

Describe the solution you'd like
Implement the following features:

  1. Download Security Improvements

    • Require valid UUID for downloads
    • Return 404 for missing, malformed, or unknown download UUIDs
    • Resolve S3 bucket from filesystem config instead of trusting request parameters
  2. Interaction Tracking

    • Add view/download counters to projects and studies
    • Create InteractionTracker service that:
      • Deduplicates per session
      • Rolls up dataset and study interactions to owning project
      • Only counts public entities (excludes reviewer previews)
    • Record views on public pages
    • Record downloads via rate-limited POST /track/download/{identifier} beacon
    • Expose counters through project and study resources
  3. Download Terms Modal

    • Display view and download counts on public project and sample pages
    • Gate downloads behind terms acceptance modal (DownloadTermsModal)
    • Use resources/markdown/download-terms.md for terms content
    • Fire download-tracking beacon on acceptance
    • Trigger download after terms acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgreater code or enhancement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions