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

Use user-benefits API to work out newspaper archive entitlement #1425

Merged
merged 5 commits into from
Dec 9, 2024

Conversation

rupertbates
Copy link
Member

@rupertbates rupertbates commented Dec 4, 2024

What does this PR change?

Up until now we have been checking members-data-api to see whether a user is eligible for newspaper archive access. This was problematic because the only way we could deduce whether a user was entitled or not was if they had both the supporterPlus and guardianWeeklySubscriber flag set, however this is not actually the same as being subscribed to tier three.

This PR replaces the call to mdapi with a call to the new user-benefits API which has been built to centralise the logic around which users are entitled to which benefits.

Depends on this PR

@rupertbates rupertbates changed the title Add support-service-lambdas as dependency Use user-benefits API to work out newspaper archive entitlement Dec 5, 2024
server/apiProxy.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@rBangay rBangay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 ... approved with one pedantic comment

@rupertbates rupertbates merged commit 0d67bfe into main Dec 9, 2024
12 of 13 checks passed
@rupertbates rupertbates deleted the user-benefits-api branch December 9, 2024 15:29
@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @rupertbates 10 minutes and 33 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants