-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#13102] Admin rejecting account request: give actual account in the email template #13118
[#13102] Admin rejecting account request: give actual account in the email template #13118
Conversation
Changed the missing googleId string from "GOOGLEID NOT FOUND" to "NO_GOOGLEID" as its shorter and the underscores makes it more obvious. Added two tests for setting the existingAccount googleId when there are instructor accounts found, and when there are no instructor accounts found. |
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.
LGTM! thanks for the tests
Fixes #13102
Outline of Solution
Replaces accountRequestEmail with the requesters googleId and add some extra information.
Gets the googleId via an admin search with accountRequestEmail as the searchKey.
If no instructor account is found for that email, it will instead say "GOOGLEID NOT FOUND".
Regarding the fix:
It's possible during development (not sure about live) to accidentally create multiple accounts if the googleId chosen is invalid, resulting in nothing after "TEAMMATES using your Google account:".
The fix goes through all instructors with accountRequestEmail and uses the googleId of the last account with a non blank googleId.