online-judge
online-judge copied to clipboard
Add WCIPEG account merging
trafficstars
Merge Process:
- WCIPEG user logs in to DMOJ with their account and sees a button on their profile to merge.
- WCIPEG user fills in the name of a native DMOJ user to merge into.
- An email is sent to the DMOJ user to accept the merge.
- WCIPEG user clicks this link, has their data merged, get logged out, and deactivated.
- DMOJ user now has the WCIPEG user's data and can be logged in to as before.
TODO:
- [x] Request Form
- [x] Scary JavaScript confirm dialog
- [ ] ~~Separate AJAX endpoint to filter out peg users with select2 (or js that does this frontend)?~~
- [x] Generating token
- [x] Email sending functionality
- [x] ReCaptcha
- [x] Activation form
- [x] Verify acc_peg login
- [x] Log out user
- [x] Merge user
- [x]
generic_messagesuccess message
- [x]
PEGUsermodel- [x]
userOneToOneFieldto WCIPEG account - [x]
merge_userOneToOneField(nullable) to DMOJ account
- [x]
Codecov Report
Merging #1448 into master will increase coverage by
0.21%. The diff coverage is46.23%.
@@ Coverage Diff @@
## master #1448 +/- ##
==========================================
+ Coverage 45.84% 46.05% +0.21%
==========================================
Files 208 214 +6
Lines 11968 12152 +184
==========================================
+ Hits 5487 5597 +110
- Misses 6481 6555 +74
| Impacted Files | Coverage Δ | |
|---|---|---|
| peg_merge/apps.py | 0.00% <0.00%> (ø) |
|
| peg_merge/migrations/0001_initial.py | 0.00% <0.00%> (ø) |
|
| peg_merge/models.py | 0.00% <0.00%> (ø) |
|
| judge/models/profile.py | 92.26% <33.33%> (-1.08%) |
:arrow_down: |
| peg_merge/views.py | 50.98% <50.98%> (ø) |
|
| peg_merge/forms.py | 60.86% <60.86%> (ø) |
|
| dmoj/urls.py | 90.00% <100.00%> (+0.52%) |
:arrow_up: |
| judge/signals.py | 68.00% <0.00%> (-8.20%) |
:arrow_down: |
| judge/views/submission.py | 32.91% <0.00%> (-0.25%) |
:arrow_down: |
| ... and 15 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 139dbb6...d0c4e4a. Read the comment docs.
This is patched in prod and will remain so, but let's close it out to decrease open PR clutter.