Skip to content

updated putBundle with add policy conditions functionality with unit, component tests#129

Draft
BarathaAberathne wants to merge 1 commit into
developfrom
bugfix/dis-4606-allocate-content-items-when-bundle-update-teams
Draft

updated putBundle with add policy conditions functionality with unit, component tests#129
BarathaAberathne wants to merge 1 commit into
developfrom
bugfix/dis-4606-allocate-content-items-when-bundle-update-teams

Conversation

@BarathaAberathne

@BarathaAberathne BarathaAberathne commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

What

Ticket: https://officefornationalstatistics.atlassian.net/browse/DIS-4606

Fixed a permissions values update bug in bundle updates.

When a preview team was added to a bundle after content already existed, the team policy was created but condition.values stayed empty, causing 403 for dataset edition access.

Changes made:

  • Updated PUT /bundles/{id} flow to:
  • Detect newly added preview teams (current vs updated preview teams).
  • Backfill policy condition values for those newly added teams from existing bundle content items.
  • Added application method:

Updated unit tests and added component test

How to review

Validate expected behavior:

  • Create bundle with existing content.
  • Update bundle to add a new preview team.
  • Confirm preview team policy includes both dataset and dataset/edition in condition.values.
  • Confirm same for a second team added in a later update.
  • when {{host}}/datasets/static-test-dataset/editions/time-series is called from the correct viewer 200 is returned from dp-dataset-api

Who can review

anyone

@BarathaAberathne BarathaAberathne requested a review from a team as a code owner March 6, 2026 08:49
@BarathaAberathne BarathaAberathne marked this pull request as draft March 6, 2026 09:00
@BarathaAberathne BarathaAberathne marked this pull request as ready for review March 6, 2026 09:56
@BarathaAberathne BarathaAberathne force-pushed the bugfix/dis-4606-allocate-content-items-when-bundle-update-teams branch from abaf156 to 2da8400 Compare March 6, 2026 10:00
@BarathaAberathne BarathaAberathne marked this pull request as draft March 6, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant