Repository navigation
Let the teacher see who never got in, and send the invitation again - #54
Merged
Merged
Conversation
Adding a parent or a student creates their account and emails them an invitation to set a password. That email goes out exactly once, and a send that fails is only written to the log — AccountProvisioning catches the exception so the teacher's save does not fail with it. So a parent who never received it — a failed send, a spam folder, a link that expired — had no way in, and the teacher had no way to help her and no way to even know. There was no resend anywhere in the app. Setting a password from the invitation is what verifies the address, so EmailConfirmed already says who has come in. That now reaches the lists as AccountActivated, the students screen marks the ones still waiting, and a button next to them sends the invitation again. Refused where it would be wrong: someone who already set a password (409), a student with no sign-in of her own (409), and another teacher's parent (404, through the tenant filter).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a parent or a student creates their account and emails them an invitation to set a password. That email goes out exactly once, and a send that fails is only written to the log —
AccountProvisioningcatches the exception on purpose, so the teacher's save does not fail because of a mail server:That is the right call for the save. But it means a parent who never received the invitation — a failed send, a spam folder, a link that has since expired — had no way in, and the teacher had no way to help her. I searched the whole app: there was no resend anywhere, and nothing on any screen said whether an invitation had ever been accepted.
StudentListItemDtocarriedHasLogin(an address exists) but not whether anyone had ever used it.The recovery that did exist was "שכחתי סיסמה" — which only helps a parent who knows she has an account, which is exactly what she does not know if the email never arrived.
Where the answer already was
Setting a password from the invitation is what verifies the address:
So
EmailConfirmedalready records who has come in. It just never reached the teacher. It now travels on both lists asAccountActivated, the students screen marks whoever is still waiting, and a button next to the mark sends the invitation again.Verified against the running app
A newly created parent:
A real second email, counted in the mail sink — not just a reassuring toast.
Then she walks the link and sets a password:
The mark and the button are gone, and the endpoint refuses.
Refused where it would be wrong
The address belongs to a real person, so the endpoint is not a button anyone can point anywhere:
Testing
dotnet test— 255 passing, including five new ones inResendInvitationTestscovering each line of that table plus the list flag flipping from false to true once a password is set.npx ng buildandnpx vitest run— clean, 30 passing.Demo data restored and verified: the test parent was deleted, and the parents are back to דוד כהן and אסתר ברגר with 3 students.