Skip to content
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

Merged

Conversation

Andy-W-Developer
Copy link
Contributor

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
Copy link
Contributor Author

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.

@weiquu weiquu added the s.ToReview The PR is waiting for review(s) label Jun 10, 2024
Copy link
Contributor

@weiquu weiquu left a 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

@weiquu weiquu merged commit efeffd4 into TEAMMATES:master Jun 28, 2024
11 checks passed
@weiquu weiquu added s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging and removed s.ToReview The PR is waiting for review(s) labels Jun 28, 2024
@Andy-W-Developer Andy-W-Developer deleted the change-reject-with-reason-text branch July 1, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin rejecting account request: give actual account in the email template
3 participants