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

IMN 538 - Fix user info fetch during contract creation #543

Merged

Conversation

MalpenZibo
Copy link
Collaborator

@MalpenZibo MalpenZibo commented May 22, 2024

Closes IMN-538

From scala counterpart pagopa/interop-be-agreement-process#263

@MalpenZibo MalpenZibo changed the base branch from main to IMN-511-pdf-generator May 22, 2024 10:54
@Viktor-K Viktor-K force-pushed the IMN-511-pdf-generator branch 2 times, most recently from de4d157 to 8335b96 Compare May 27, 2024 11:05
Base automatically changed from IMN-511-pdf-generator to main May 27, 2024 15:06
@MalpenZibo MalpenZibo force-pushed the IMN-538_fix-user-info-fetch-during-contract-creation branch from 8e8c4fc to f56f444 Compare May 27, 2024 16:00
@MalpenZibo MalpenZibo force-pushed the IMN-538_fix-user-info-fetch-during-contract-creation branch from f56f444 to 316c53f Compare May 30, 2024 09:35
@MalpenZibo MalpenZibo marked this pull request as ready for review May 30, 2024 13:24
@@ -127,16 +129,29 @@ const getAttributeInvolved = async (
};

const getSubmissionInfo = async (
Copy link
Collaborator

Choose a reason for hiding this comment

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

@MalpenZibo Does this apply only to this getSubmissionInfo case or also to the getActivationInfo below?
If it applies also to that case, maybe you could move this logic from here into the retrieveUser, which is called by both functions

Copy link
Contributor

Choose a reason for hiding this comment

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

it can be applied just to submission info.
The submission can be performed only by the consumer, and we can safely take the details from it.

The activation can be done both by consumer and by producer, but in both cases the getActivationInfo is called by the user who also activated the agreement. This is why we can take the info starting from the context (of the jwt)

Copy link
Collaborator

@ecamellini ecamellini left a comment

Choose a reason for hiding this comment

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

Left a comment (the same question applies to the solution being applied to Scala, so maybe it needs also to be clarified on that side)

@ecamellini
Copy link
Collaborator

I double checked, the same question I left here applies to the fix on the Scala code cc @nttdata-rtorsoli & @galales / @beetlecrunch

@@ -127,16 +129,29 @@ const getAttributeInvolved = async (
};

const getSubmissionInfo = async (
Copy link
Contributor

Choose a reason for hiding this comment

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

it can be applied just to submission info.
The submission can be performed only by the consumer, and we can safely take the details from it.

The activation can be done both by consumer and by producer, but in both cases the getActivationInfo is called by the user who also activated the agreement. This is why we can take the info starting from the context (of the jwt)

@MalpenZibo MalpenZibo merged commit 3c05537 into main Jun 3, 2024
8 checks passed
@MalpenZibo MalpenZibo deleted the IMN-538_fix-user-info-fetch-during-contract-creation branch June 3, 2024 08:38
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.

3 participants