-
Notifications
You must be signed in to change notification settings - Fork 308
UI to send confirmation email for unclaimed packages #4309
UI to send confirmation email for unclaimed packages #4309
Conversation
The model for this is the email verification workflow. |
Oops. We'll see what Travis does with that |
8e7c3d9
to
8feb680
Compare
8feb680
to
af0ea7b
Compare
11bfc72
to
13c1703
Compare
@@ -36,6 +37,11 @@ elif action == 'set-primary': | |||
participant.update_email(address) | |||
elif action == 'remove': | |||
participant.remove_email(address) | |||
elif action == 'add-email-and-claim-package': | |||
package_id = request.body['package_id'] | |||
package = Package.from_id(package_id) |
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.
What if it's None
?
Sooooo ... I've been working on teaching the claim form about when there is only one address, but the implication of #4305 (comment) is that there will only ever be zero or one address(!). |
Yay for talking to users? :) |
Though I guess that's not necessarily true for all package managers, and since we're already mostly done with accounting for multiple emails (it would be work to change the schema at this point) then we may as well go for that. But on the other hand if we want to specify where the email is coming from, that will be different for each package manager. |
We are trying to get this done once for npm. Future expansion is out of scope until we see traction from npm. We should tailor this to npm. |
67ad75a
to
0a16a01
Compare
Ready for review, @mattbk @nobodxbodon @JessaWitzel et al. |
0a16a01
to
b9c4323
Compare
b9c4323
to
12659d1
Compare
www/on/npm/%package/index.html.spt
Outdated
{% else %} | ||
<input type="hidden" name="package_id" value="{{ package.id }}"> | ||
<ul> | ||
{% for i, email in enumerate(package.emails) %} |
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.
Shall we hide the bullets in this email list?
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.
Done in 455f06c.
tests/py/test_www_npm_package.py
Outdated
assert '[email protected]' in body | ||
|
||
def test_auth_gets_multiple_options_if_present(self): | ||
self.make_package('npm', 'bar', 'Bar', ['[email protected]', '[email protected]']) |
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.
nit: use constant like 9c05276?
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.
Done in 3586969.
Kicked Travis, green now. We good here? |
Part of #4305.