-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create configuration for locking the Submission for a flow after it is submitted #437
Conversation
…Properties [#186001975]
[#186001975]
[#186001975]
[#186001975] Co-authored-by: Cypress Borg <[email protected]>
[#186001975] Co-authored-by: Cypress Borg <[email protected]>
[#186001975]
[#186001975]
[#186001975]
[#186001975]
This PR adds the ability to configure locking down a submission such that it can no longer be edited after the submission has been submitted (which adds a submittedAt time-stamp to the submission object). This is achieved by adding configuration to the lock-after-submitted:
- flow: ubi
redirect: success and by adding an landmarks:
firstScreen: howThisWorks
afterSubmitPages:
- nextSteps
- success The changes in this PR will cause a user who was already submitted their application to be redirected to the Note that this PR does not actually lock down the Submission object, or any rows in the Submission DB table, but rather just prevents the user from POSTing any data or GETing any screen not indicated in Additional changes in this PR include a refactor of the The If submission locking is enabled for a flow, the It will do the same when the These errors occur during the applications build time and as such will fail when the SNE attempts to run an application that has been misconfigured, with error messages alerting them to the issue and steps needed to remediate the problem. |
Hi - I can look at this early next week. |
private SessionContinuityInterceptorConfiguration sessionContinuityInterceptorConfiguration; | ||
private ClassPathResource classPathResource; | ||
|
||
String AFTER_SUBIT_MISCONFIGURATION_ERROR = "You have enabled submission locking for the flow testFlow but the afterSubmitPages landmark is not set in your flow configuration yaml file."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo SUBIT
// The factory should throw an exception when it tries to validate the flow since there is no landmarks section but session continuity interception is enabled | ||
FlowConfigurationException errorThrownForNoLandmarkSectionAtAll = assertThrows(FlowConfigurationException.class, | ||
() -> flowsConfigurationFactory.validateLandmarksFirstScreen(flowConfig)); | ||
assertThat(errorThrownForNoLandmarkSectionAtAll.getMessage()).isEqualTo(FIRST_SCREEN_MISCONFIGURATION_ERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update these to use assertEquals
An example of a time you might include a non-static page in the list of allowed pages is if you have | ||
a page that is used to collect feedback from the user after they have submitted their application. In | ||
this scenario you can include the feedback page in the list of allowed pages so that the user can | ||
can submit their feedback after they have submitted their application. The data would be saved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user can can submit
should read user can submit
* | ||
* @param screen The current screen name. | ||
* @param submission The submission object. | ||
* @param flowName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say: @param flowName The name of the flow
? It feels self explanatory but I think we should still explain what it is.
No description provided.