Skip to content

BI-2860: Made changes to the end point to limit the access.#518

Merged
nickpalladino merged 1 commit into
release/1.3from
bug/BI-2860-v1.3
May 13, 2026
Merged

BI-2860: Made changes to the end point to limit the access.#518
nickpalladino merged 1 commit into
release/1.3from
bug/BI-2860-v1.3

Conversation

@humsika
Copy link
Copy Markdown
Contributor

@humsika humsika commented May 12, 2026

Description

JIRA story card link: BI-2860

This PR updates the experiment dataset creation permission so that POST /programs/{programId}/experiments/{experimentId}/dataset is restricted to Program Administrator.

Previously, an Experimental Collaborator could reach a flow in the UI that suggested sub-entity dataset creation was available. This change enforces the backend permission rule so collaborator users cannot create sub-entity datasets directly through the API.

This PR also adds test coverage for the forbidden collaborator case.

And it depends on the bug/BI-2860-v1.3 for the frontend.

Dependencies

bi-web: bug/BI-2860-v1.3
bi-api: bug/BI-2860-v1.3

Testing

  1. Run the existing API test suite for the updated controller test
  2. Verify Program Admin can still create a sub-entity dataset
  3. Verify Experimental Collaborator receives 403 Forbidden on:
    POST /programs/{programId}/experiments/{experimentId}/dataset

Manual validation:

  1. Use the related bi-web PR
  2. Confirm collaborator user sees the option disabled in the UI
  3. Confirm backend blocks direct API access for collaborator users

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit and/or integration tests to cover this change or tests are not applicable
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth

@github-actions github-actions Bot added the bug Something isn't working label May 12, 2026
@humsika humsika requested review from a team and nickpalladino and removed request for a team May 12, 2026 23:13
Copy link
Copy Markdown
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@nickpalladino nickpalladino merged commit 3aab236 into release/1.3 May 13, 2026
2 of 3 checks passed
@nickpalladino nickpalladino deleted the bug/BI-2860-v1.3 branch May 13, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants