warsztatywww / aplikacjawww

Web application for scientific summer school
https://warsztatywww.pl
GNU Affero General Public License v3.0
5 stars 6 forks source link

Make it possible to register interest via entering email #648

Closed krzys-h closed 1 year ago

krzys-h commented 1 year ago

The behavior is as follows:

  1. If the user is logged in, the email field is autopopulated, and registering registers the USER
  2. If the user is not logged in, and an email of an existing user is typed in, that USER is registered
  3. If the user is not logged in, and user with the email does not exist, then just the EMAIL is added to the database

The "Participants" and "Emails" views display interested emails alongside real users. If a user registers later, with an email that was previously added to the database, then the old email-only entry will be hidden.

Review carefully since I was hacking this together quickly without thinking, and many places in the codebase were not designed to work without a real user object...


This change is Reviewable

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 56.71% and project coverage change: -0.33 :warning:

Comparison is base (d1a8832) 84.68% compared to head (101aa6f) 84.35%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #648 +/- ## ========================================== - Coverage 84.68% 84.35% -0.33% ========================================== Files 15 15 Lines 2468 2512 +44 ========================================== + Hits 2090 2119 +29 - Misses 378 393 +15 ``` | [Impacted Files](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww) | Coverage Δ | | |---|---|---| | [wwwapp/mail\_views.py](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww#diff-d3d3YXBwL21haWxfdmlld3MucHk=) | `50.00% <25.00%> (ø)` | | | [wwwapp/views.py](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww#diff-d3d3YXBwL3ZpZXdzLnB5) | `78.52% <42.85%> (-1.15%)` | :arrow_down: | | [wwwapp/models.py](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww#diff-d3d3YXBwL21vZGVscy5weQ==) | `85.29% <85.71%> (+<0.01%)` | :arrow_up: | | [wwwapp/admin.py](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww#diff-d3d3YXBwL2FkbWluLnB5) | `79.86% <100.00%> (+0.13%)` | :arrow_up: | | [wwwapp/forms.py](https://codecov.io/gh/warsztatywww/aplikacjawww/pull/648?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww#diff-d3d3YXBwL2Zvcm1zLnB5) | `96.36% <100.00%> (+0.14%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=warsztatywww)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.