-
Notifications
You must be signed in to change notification settings - Fork 5
Nour/email verification #955
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
Conversation
| queryCache: new QueryCache({ | ||
| onError: (error) => { | ||
| if (error instanceof ResponseError) { | ||
| // TODO: add special handling for 403 email verification erros |
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.
We also need to let our custom backend errors have their messages show in their toasts as well.. seems like a whole future pr for these two tasks
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.
yeah might be a another frontend pr to resolve
lowtorola
left a comment
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 ![]()
This pull request introduces email verification as a requirement for key user actions in the competition and team APIs. It adds a new
email_verifiedfield to theUsermodel, creates a model for managing email verification tokens, and updates permissions across multiple endpoints to enforce email verification. Test cases and admin interfaces are also updated to support and validate this new flow.Email Verification Enforcement
IsEmailVerifiedpermission to all relevant endpoints incompete/views.pyandteams/views.py, ensuring only users with verified emails can create submissions, join/leave teams, and access team information. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]User Model and Database Changes
email_verifiedBoolean field to theUsermodel via migration, defaulting toFalse.EmailVerificationTokenmodel and migration for managing email verification tokens, including admin registration for viewing tokens. [1] [2] [3]Test Suite Updates
email_verified=True, reflecting the new permission requirements and preventing test failures. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Dependency Update
django-sortedm2mfrom version 3.1.1 to 4.0.0 inenvironment.yml.These changes collectively enforce email verification for users performing sensitive actions, provide the necessary backend infrastructure for verification tokens, and ensure the test suite remains robust under the new requirements.