Skip to content

fix(auth): allow POST method for organisation-specific access checks#99

Merged
james-cross merged 1 commit intostagingfrom
fix/organisation-confirm-info-auth
Jan 27, 2026
Merged

fix(auth): allow POST method for organisation-specific access checks#99
james-cross merged 1 commit intostagingfrom
fix/organisation-confirm-info-auth

Conversation

@james-cross
Copy link
Contributor

Summary

  • Adds POST to the HTTP methods checked in requireOrganisationAccess middleware
  • Fixes 403 Forbidden error when CityAdmins or OrgAdmins use the "Information verified" button on organisation pages

Problem

The confirm-info endpoint uses POST with an organisation ID, but the middleware only checked GET, PUT, PATCH, and DELETE for organisation-specific access. This caused POST requests to fall through to the generic handler which expected AssociatedLocationIds in the request body.

Test plan

  • Log in as a CityAdmin user
  • Navigate to an organisation in their assigned location
  • Click "Information verified" button
  • Verify the action succeeds without a 403 error

@james-cross james-cross merged commit 23e6c43 into staging Jan 27, 2026
1 check passed
@james-cross james-cross deleted the fix/organisation-confirm-info-auth branch February 10, 2026 09:46
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