Skip to content

Enforce country restrictions for WhatNow entities#63

Open
jajaramillo24 wants to merge 1 commit intostagingfrom
WN-350
Open

Enforce country restrictions for WhatNow entities#63
jajaramillo24 wants to merge 1 commit intostagingfrom
WN-350

Conversation

@jajaramillo24
Copy link
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.
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