teammates icon indicating copy to clipboard operation
teammates copied to clipboard

[#13102] Admin rejecting account request: give actual account in the email template

Open Andy-W-Developer opened this issue 1 year ago • 1 comments

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. new_reject_with_reason If no instructor account is found for that email, it will instead say "GOOGLEID NOT FOUND". new_reject_with_reason_2

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. bug

Andy-W-Developer avatar May 21 '24 11:05 Andy-W-Developer

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.

Andy-W-Developer avatar May 23 '24 16:05 Andy-W-Developer