Open monocle opened 1 year ago
Not sure I follow. Are you saying that you can get to the "Generate Expungement Forms" without having searched a person? And thus once you fill out the form and hit submit, you would get blank forms?
@KentShikama Currently, in production, it's possible to visit https://recordsponge.com/fill-expungement-forms without being logged in. Is that okay?
But based on
it seems like if someone is not logged in or no search has been done yet, there should be a redirect to /record-search
.
Currently, that check on props.aliases.length
is always true (edit: before making a search) because the initial state is
If there's a use case to be able to fill those forms out without having done a search or being logged in, I can just remove that redirect logic from the component.
edit: Should we add a login check and then check for an empty first alias?
Currently in production, if visiting
/fill-expungement-forms
without doing anything else prior, it will display FillForms and UserDataForm.But in UserDataForm there is this: https://github.com/monocle/recordexpungPDX/blob/25a376c3fd5ab770d54a4734ee0b21c0c973ca9a/src/frontend/src/components/FillForms/UserDataForm.tsx#L120-L124
So it seems that this route should not be accessible unless there are previous aliases. However, there seems to always be at least one blank alias: