Skip to content

Commit

Permalink
Prevent split-flow in laterdocs also
Browse files Browse the repository at this point in the history
Co-authored-by: Arin Choi <[email protected]>
  • Loading branch information
tdooner and arinchoi03 committed Aug 10, 2023
1 parent 50f949d commit 185c783
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ public class DataRequiredInterceptor implements HandlerInterceptor {
Map.entry("submitting", "firstName"),
Map.entry("legalStuff", "firstName"),
Map.entry("signName", "firstName"),
Map.entry("success", "firstName")
Map.entry("success", "firstName"),

// docUpload flow
Map.entry("uploadDocuments", "firstName"),
Map.entry("docUploadConfirm", "firstName")
);

public DataRequiredInterceptor(SubmissionRepositoryService submissionRepositoryService) {
Expand All @@ -104,8 +108,8 @@ public DataRequiredInterceptor(SubmissionRepositoryService submissionRepositoryS
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
try {
var parsedUrl = new AntPathMatcher().extractUriTemplateVariables(PATH_FORMAT, request.getRequestURI());
if (!parsedUrl.get("flow").equals("pebt")) {
return true; // Only enforce data requirements in PEBT flow.
if (!parsedUrl.get("flow").equals("pebt") && !parsedUrl.get("flow").equals("docUpload")) {
return true;
}
var requiredData = REQUIRED_DATA.get(parsedUrl.get("screen"));
if (requiredData == null) {
Expand Down

0 comments on commit 185c783

Please sign in to comment.