-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
I'm working on this commit that actually adds the email address during |
Heck with it. Let's just rerecord the VCR fixture. 😉 |
Moved off this PR into #4495. |
Rebased on master, was 4587ba8. |
Bringing over some local notes:
|
965b47a
to
ebf2c95
Compare
Ready for review, @rohitpaulk! Commits are a bit sprawling, pushing the limit on max lines delta. Lmk if I should factor out a PR for ease. |
Rebased, was c95af1e. |
It all seems to work for me, but (as a new user), what do I do once I'm here? What's the next step?
I feel like we're not closing the loop toward people knowing what they need to be able to receive money. Maybe this is less of a problem with developers? (i.e., do they read more than regular people?) |
Also factored out #4516 and #4517. More manageable now, @rohitpaulk? :-) |
5400164
to
bf20047
Compare
Rebased, was 6fc28cc. |
{% else %} | ||
|
||
{% if not packages_for_claiming %} | ||
<p class="sorry">{{ _("No packages found.") }}</p> |
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.
Might be worth adding a note saying that we searched using the email addresses a, b, and c - and to update on npm if needed (just like the page for a single package)
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.
Oh wait, that is present below. Ignore.
www/on/npm/index.html.spt
Outdated
suppress_sidebar = True | ||
website.redirect('/') # nothing here yet | ||
npackages, Npackages = website.db.one(''' |
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.
I think the naming here could be better. These values are only being pulled so that we can show the x packages out of y are on Gratipay
- might be better to keep them in a single dict so that a confusion doesn't arise between npackages
, Npackages
and packages_for_claiming
.
How about - npm_stats = website.db.one('''select () as total_packages, () as claimed_packages''', return_as=dict)
, followed by n=npm_stats.total_packages, N=npm_stats.claimed_packages
(in the template)?
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 abfef42!
@@ -46,7 +47,10 @@ if action in ('add-email', 'resend', 'start-verification'): | |||
raise Response(400) | |||
|
|||
participant.start_email_verification(address, *packages) | |||
msg = _("Check your inbox for a verification link.") | |||
if show_address_in_message: |
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.
Hmm, we always have an address
- why not show it in the link?
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.
i.e. Why do we have to say Check your inbox
when we have an address
available
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.
Is it because we send emails to multiple addresses?
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.
I only see two emails being sent in start_email_verification
- one is a verification notice to the primary email, the other is the actual verification link to the address being verified.
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.
Because it's a content spoofing vector. I thought we had a HackerOne ticket about this but it's not jumping out at me on http://inside.gratipay.com/appendices/disclosures.
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.
This is confusing 😕
D'oh! 😞
verification.spt
is used both to verify emails and to verify linking packages to emails.
Yeah, it seemed to me that it was best to have one code path for both, since we want linking packages to emails to also verify the email. That is, we don't want to make the user go through two verification flows (one for the address itself, a second for the packages) when from their point of view one should be sufficient. Am I thinking about that right?
The pattern of
if
conditions suggests that there isn't much in common either
Are you referring to the if action == 'start-verification'
block? That's the extra bit for the package claiming case, where we load the packages in question. The flows rejoin just after, in the call to start_email_verification
, which is where the bulk of the common wiring lives.
I think it is best to separate these out.
i.e. use separate functions (and templates) for verifying an email vs verifying linking an email to a package
I agree it's pretty dense (especially when we get to finish_email_verification
), but I think it's necessary to support the simpler, single-step user experience during package claiming. Do you see a way to refactor while preserving the single-step flow?
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, it seemed to me that it was best to have one code path for both, since we want linking packages to emails to also verify the email. That is, we don't want to make the user go through two verification flows (one for the address itself, a second for the packages) when from their point of view one should be sufficient. Am I thinking about that right?
I see how this makes sense. In that case, do we absolutely need to re-verify emails when claiming packages? If a user has a verified email, can't we just allow them to claim the package directly?
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.
Decided in slack to reticket dropping the re-verification.
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.
^ Discussed on Slack.
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.
Reticketed as #4520.
Rebased, was abfef42. |
Picking up from #4416.
Todo
emails
duringmake_participant
: Refactor ahead of bulk npm #4495get_packages_for_claiming
get_packages_for_claiming
to sort/group as desiredemails/modify.json
, send to address displayedreuse open review ticket where possible—bumping to Reuse open review tickets where possible #4505