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

MLPAB-1743: Create a new LPA as a supporter #1017

Merged
merged 19 commits into from
Feb 7, 2024
Merged

MLPAB-1743: Create a new LPA as a supporter #1017

merged 19 commits into from
Feb 7, 2024

Conversation

acsauk
Copy link
Contributor

@acsauk acsauk commented Feb 1, 2024

Purpose

The bulk of change here is getting the required data in session to make the jump from supporter to donor handlers. There will need to be a follow-up ticket to fix any issues encountered in the donor flow while acting as a supporter.

Fixes MLPAB-1743

@@ -93,6 +111,37 @@ func (s *organisationStore) CreateMemberInvite(ctx context.Context, organisation
return nil
}

func (s *organisationStore) CreateLPA(ctx context.Context, organisationID string) (*actor.DonorProvidedDetails, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm leaving this here for now. We could probably modify donorStore.Create() but I didn't want to have to think through the LpaLink implications until we need it for the dashboard.

@@ -35,22 +35,30 @@ func LoginCallback(oneLoginClient LoginCallbackOneLoginClient, sessionStore sesh

session := &sesh.LoginSession{
IDToken: idToken,
Sub: userInfo.Sub,
Sub: "supporter-" + userInfo.Sub,
Copy link
Contributor Author

@acsauk acsauk Feb 1, 2024

Choose a reason for hiding this comment

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

Good call on this @hawx - protection against GOL accounts being used in supporter/non-supporter journeys.

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (5fb3e36) 92.14% compared to head (ac2b0bf) 92.10%.

Files Patch % Lines
internal/page/supporter/register.go 71.42% 2 Missing and 2 partials ⚠️
internal/app/organisation_store.go 91.66% 1 Missing and 1 partial ⚠️
internal/page/supporter/login_callback.go 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1017      +/-   ##
==========================================
- Coverage   92.14%   92.10%   -0.05%     
==========================================
  Files         181      182       +1     
  Lines        8025     8081      +56     
==========================================
+ Hits         7395     7443      +48     
- Misses        510      514       +4     
- Partials      120      124       +4     
Flag Coverage Δ
unittests 92.10% <90.12%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acsauk acsauk changed the title MLPAB-1743 MLPAB-1743: Create a new LPA as a supporter Feb 1, 2024
@acsauk acsauk marked this pull request as ready for review February 1, 2024 18:23
@acsauk acsauk requested a review from a team as a code owner February 1, 2024 18:23
@acsauk acsauk temporarily deployed to dev_1017mlpab17 February 1, 2024 18:45 — with GitHub Actions Inactive
@acsauk acsauk temporarily deployed to dev_1017mlpab17 February 5, 2024 09:58 — with GitHub Actions Inactive
@@ -98,6 +98,7 @@ body:not(.js-enabled) .govuk-back-link {
@include govuk-media-query($from: tablet) {
@include govuk-responsive-padding(4, "bottom");
}
color: govuk-colour("black");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following design review

@acsauk acsauk temporarily deployed to dev_1017mlpab17 February 5, 2024 11:49 — with GitHub Actions Inactive
hawx
hawx previously approved these changes Feb 7, 2024
if err == nil {
session.OrganisationID = organisation.ID
Copy link
Contributor

Choose a reason for hiding this comment

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

We could extend session with OrganisationName too, then we can let that flow through to AppData so the header contains it. Having it not be "live" is an ok tradeoff for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah thats probably a good idea, I'll add in.

internal/page/supporter/register.go Outdated Show resolved Hide resolved
@acsauk acsauk merged commit b3f1714 into main Feb 7, 2024
26 checks passed
@acsauk acsauk deleted the MLPAB-1743 branch February 7, 2024 15:37
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