Skip to content

PM-4952: Allow project member BA detail access#14

Closed
jmgasper wants to merge 1 commit into
developfrom
PM-4952-1
Closed

PM-4952: Allow project member BA detail access#14
jmgasper wants to merge 1 commit into
developfrom
PM-4952-1

Conversation

@jmgasper

Copy link
Copy Markdown
Contributor

What was broken

Project-level PM users in Work could see the project billing account name and id from Projects API, but the Billing Accounts API detail route could still reject their detail request before the project membership fallback could help.

Root cause (if identifiable)

The previous fix added a project membership fallback inside the billing-account detail service, but the detail route still only allowed billing-account reader roles. Users who only arrived as regular Topcoder project members could not reach that fallback, and the fallback did not constrain project membership to the roles allowed by Projects API for billing-account details.

What was changed

Allowed Topcoder User tokens through GET /billing-accounts/:billingAccountId only, then kept the service restricted to direct BillingAccountAccess grants or active project membership with a management or copilot project role on a project using the billing account. Project-scoped callers now also get line items filtered by active project membership.

Updated README and Swagger authorization text to document the project-scoped detail behavior.

Any added/updated tests

No automated tests were added because billing-accounts-api-v6 does not define a test script. Validation was performed with pnpm lint and pnpm build; pnpm test reports that the test script is missing.

What was broken

Project-level PM users in Work could see the project billing account name and id from Projects API, but the Billing Accounts API detail route could still reject their detail request before the project membership fallback could help.

Root cause (if identifiable)

The previous fix added a project membership fallback inside the billing-account detail service, but the detail route still only allowed billing-account reader roles. Users who only arrived as regular Topcoder project members could not reach that fallback, and the fallback did not constrain project membership to the roles allowed by Projects API for billing-account details.

What was changed

Allowed Topcoder User tokens through GET /billing-accounts/:billingAccountId only, then kept the service restricted to direct BillingAccountAccess grants or active project membership with a management or copilot project role on a project using the billing account. Project-scoped callers now also get line items filtered by active project membership.

Updated README and Swagger authorization text to document the project-scoped detail behavior.

Any added/updated tests

No automated tests were added because billing-accounts-api-v6 does not define a test script. Validation was performed with pnpm lint and pnpm build; pnpm test reports that the test script is missing.
@jmgasper jmgasper closed this Apr 30, 2026
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