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

[CPDLP-3899] Ensure Void/Show declarations are scoped to ECF declarations #5402

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

leandroalemao
Copy link
Contributor

@leandroalemao leandroalemao commented Jan 3, 2025

Context

As part of our clean up of NPQ in ECF, we are scoping all endpoints and queries to ECF only. We need to also scope void/show declaration to ECF as well.

Changes proposed in this pull request

  • For voiding declarations in v1/v2/v3 scope the queries to only allow voiding ECF declarations only and not NPQ;
  • Tried to replace participant_declaration_for_lead_provider by participant_declaration_query_scope but the queries of the second are slightly different taking in consideration induction records & partnerships as well. That would allow past lead providers to void declarations currently with other lead providers;
  • Single declaration endpoints are already scoped by ECF;

Copy link

github-actions bot commented Jan 3, 2025

Review app deployed to https://cpd-ecf-review-5402-web.test.teacherservices.cloud

@@ -71,7 +71,7 @@ def participant_declaration_query_scope
end

def participant_declaration_for_lead_provider
@participant_declaration_for_lead_provider ||= ParticipantDeclaration.for_lead_provider(cpd_lead_provider).find(params[:id])
@participant_declaration_for_lead_provider ||= ParticipantDeclaration::ECF.for_lead_provider(cpd_lead_provider).find(params[:id])
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add specs for this please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it to ensure NPQ declarations are no longer returned maybe? 🤔 I'm not sue its worth adding specs for those given we're nuking the data (or have already removed it I'm not sure?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

yea fair enough if NPQ is going we can't really test it

@leandroalemao leandroalemao requested a review from cwrw January 3, 2025 15:46
@leandroalemao leandroalemao added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 772305f Jan 7, 2025
29 checks passed
@leandroalemao leandroalemao deleted the CPDLP-3899 branch January 7, 2025 13:57
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.

4 participants