-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#1672] Reworked auth backends, contacts to support non-unique (digid) emails #760
[#1672] Reworked auth backends, contacts to support non-unique (digid) emails #760
Conversation
838571e
to
3f90673
Compare
…tive_duplicate_email
Codecov Report
@@ Coverage Diff @@
## feature/1672-email-unique #760 +/- ##
=============================================================
- Coverage 96.36% 96.33% -0.04%
=============================================================
Files 693 694 +1
Lines 24538 24540 +2
=============================================================
- Hits 23647 23641 -6
- Misses 891 899 +8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more 📢 Have feedback on the report? Share it here. |
@@ -33,6 +33,8 @@ def get_by_rsin(self, rsin): | |||
return self.get_queryset().get(rsin=rsin) | |||
|
|||
def eherkenning_create(self, rsin, **kwargs): | |||
raise NotImplementedError("old code, please verify before use") | |||
# TODO what is this @rsin.com email hostname? @example.org is bad enough but this actually exists |
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 don't use eHerkenning at the moment, but we will later this year for companies. Not within scope atm
@@ -219,44 +222,86 @@ class Meta: | |||
verbose_name = _("User") | |||
verbose_name_plural = _("Users") | |||
|
|||
constraints = [ |
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.
Feel free to continue with this next week. I like these more flexible unique constraints, having them depending on the login time makes sense in my eyes.
|
||
@classmethod | ||
def setUpTestData(cls): | ||
cls.msg_dupes = _("This email is already taken.") | ||
cls.msg_inactive = _("This account has been deactivated") | ||
|
||
# TODO use factories and valid Users (eg: bsn AND LoginTypeChoices.digid) |
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.
To be continued next week
|
||
@requests_mock.Mocker() | ||
def test_digid_user_non_digid_duplicate_fail(self, m): | ||
# TODO |
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.
To be continued next week
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.
It's better than that it was, but I expect we'll need a few patch releases next week during testing.
Progress on #736