Skip to content

Enforce country restrictions for WhatNow entities#63

Merged
jajaramillo24 merged 1 commit intostagingfrom
WN-350
Mar 25, 2026
Merged

Enforce country restrictions for WhatNow entities#63
jajaramillo24 merged 1 commit intostagingfrom
WN-350

Conversation

@jajaramillo24
Copy link
Copy Markdown
Collaborator

Import WhatNowEntity and add a path-based check in ApiAuthMiddleware to enforce allowed country codes for WhatNow resources. The middleware matches requests to whatnow/{id} (excluding paths containing 'org/'), loads the WhatNowEntity with its organisation, and denies access if the entity or organisation is missing or the organisation's country_code is not listed in the rules['allowed_country_code'] array.

Import WhatNowEntity and add a path-based check in ApiAuthMiddleware to enforce allowed country codes for WhatNow resources. The middleware matches requests to whatnow/{id} (excluding paths containing 'org/'), loads the WhatNowEntity with its organisation, and denies access if the entity or organisation is missing or the organisation's country_code is not listed in the rules['allowed_country_code'] array.
@jajaramillo24 jajaramillo24 merged commit a9b444c into staging Mar 25, 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.

2 participants