Skip to content

NFDIV-5328 - Stop citizens from accessing pages after submission#4703

Open
pallavijustice wants to merge 7 commits intonfdiv-5200-pre-issue-service-applicationsfrom
nfdiv-5328-frontend-changes
Open

NFDIV-5328 - Stop citizens from accessing pages after submission#4703
pallavijustice wants to merge 7 commits intonfdiv-5200-pre-issue-service-applicationsfrom
nfdiv-5328-frontend-changes

Conversation

@pallavijustice
Copy link
Copy Markdown
Contributor

…ed in no respondent address journey

Change description

Enter a description.

JIRA link (if applicable)

https://tools.hmcts.net/jira/browse/NFDIV-5328

@pallavijustice pallavijustice changed the title NFDIV-5328 - Refactor code to ensure primary address fields aren't used in no-response address journey NFDIV-5328 - Stop citizens from accessing pages after submission Mar 25, 2026
Comment on lines +204 to +207
urls: [...applicant1PreSubmissionSequence]
.filter(step => !PRE_SUBMISSION_ROUTES_TO_IGNORE.includes(step.url as PageLink))
.map(step => step.url as PageLink),
condition: data => !!data?.dateSubmitted,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thinking that to avoid blocking pages in both the pre and post-submission sequences, it could be safer to check directly against the post-submission sequence than to use an array of constants defined in this file.

It should make it future-proof automatically - if a dev adds a page to both the pre and post submission sequences, the validation will stop without them needing to be aware of and update PRE_SUBMISSION_ROUTES_TO_IGNORE in this file.

app.post(step.url, errorHandler(new postController(step.form.fields).post));
app.post(
step.url,
this.isRouteForUser as RequestHandler,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We'll also be applying validations to the post controllers of pages outside the main divorce journey with this page. Thinking we could add a QA note to guide their exploratory testing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Doo you think this is an issue. Since we already had a validation for getController here, Ii do not think it would be an issue if we aren't able to submit from here either.

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