Skip to content

[AnVIL] Always show curl export option in non-production environments #4767

@MillenniumFalconMechanic

Description

Description

Currently, the curl export option is only visible when there are datasets that include the NRES consent group. If no such datasets exist, the option is hidden entirely (see renderCohortCurlDownload and renderDatasetCurlDownload in app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders.tsx).

We want to update this behavior so that the curl export option is always visible in non-production environments (dev, staging, etc.), regardless of consent group status.

Current Behavior

  • Curl export option is hidden unless NRES or "Unrestricted access" consent groups are present
  • This applies to both cohort export and dataset export
  • The condition is purely data-driven with no environment awareness

Proposed Behavior

In non-production environments:

  • Curl export option is always visible
  • Enable/disable state can still be based on consent groups (or always enabled for testing purposes)

In production:

  • Keep the existing behavior: only show curl export option when NRES datasets exist

Affected Areas

  1. Cohort export: renderCohortCurlDownload (viewModelBuilders.tsx:1890)
  2. Dataset export: renderDatasetCurlDownload (viewModelBuilders.tsx:1902)
  3. Possibly needs environment detection utility or config flag

Rationale

This change would allow developers and testers to verify curl export functionality in non-production environments without needing to query NRES datasets specifically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions