Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolocation | Remove GU_geo_country cookie, stop checking CMP for geolocation #2728

Merged
merged 1 commit into from
May 15, 2024

Conversation

raphaelkabo
Copy link
Contributor

@raphaelkabo raphaelkabo commented May 14, 2024

What does this change?

This prepares the ground for adding some new registration newsletter consents in a subsequent PR.

The key changes are:

  • We remove all usage of the deprecated GU_geo_country cookie, in favour of the X-GU-Geolocation HTTP header sent from Fastly. In Cypress, because mocking a header in E2E tests isn't worth the hassle, we mock the geolocation state with the cypress-mocked-state cookie we used elsewhere.
  • We remove the requirement for CMP consent to be given for geolocation data to be used. For this reason, we will now always set registrationLocation in Okta, and always show geolocated newsletters in the onboarding flow. We remove all non-geolocated newsletter mappings and all uses of the PermissionedGeolocation type - it's now just Geolocation.

Tests

  • Tested in CODE - CMP consented - UK
  • Tested in CODE - CMP not consented - UK
  • Tested in CODE - CMP consented - Australia
  • Tested in CODE - CMP not consented - Australia

@raphaelkabo raphaelkabo requested review from guardian-ci and removed request for guardian-ci May 14, 2024 10:57
@raphaelkabo raphaelkabo marked this pull request as ready for review May 14, 2024 16:14
@raphaelkabo raphaelkabo requested a review from a team as a code owner May 14, 2024 16:14
src/server/lib/getRegistrationLocation.ts Outdated Show resolved Hide resolved
src/server/routes/register.ts Show resolved Hide resolved
@raphaelkabo raphaelkabo force-pushed the rk/geolocation-fixes branch 2 times, most recently from 997cac4 to 5c16516 Compare May 15, 2024 09:40
@coldlink
Copy link
Member

also this commit needs to be reworded, has wip in the name

2c2b2d3

@raphaelkabo raphaelkabo requested review from guardian-ci and removed request for guardian-ci May 15, 2024 10:21
@raphaelkabo raphaelkabo requested review from guardian-ci and removed request for guardian-ci May 15, 2024 10:26
@raphaelkabo raphaelkabo merged commit 07da531 into main May 15, 2024
27 checks passed
@raphaelkabo raphaelkabo deleted the rk/geolocation-fixes branch May 15, 2024 10:43
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.

None yet

2 participants