Closed rajadain closed 5 years ago
This works well. The activation page has copy that doesn't apply to beekeepers however, which is that logging in saves ongoing work. I think we had pushed this workflow to enhancement or removed it altogether.
The activation page has copy that doesn't apply to beekeepers however, which is that logging in saves ongoing work.
Good point. We have #328 for that. I've taken the enhancement
label off it, although I think we should defer working on it until all core functionality is in.
I fixed the app sourcing issue in 7b14b5b 7b4c576, and added a commit for #328 in 3264e22 150e4a1. Could you take another look at this?
Rebased over develop
to resolve merge conflicts.
Works well, tested after rebase !
Thanks for taking a look! Merging now.
Overview
Expands the Sign Up dialog to have four entry fields for email, username, and two password fields. All fields are required, and HTML5 validation is used to ensure they are filled before sending it to the server.
Once complete, the data is sent to the
/user/sign_up?beekeepers
endpoint as form data, which returns validation errors or a success response. The first validation error is shown at the top of the dialog, using similar styling as in the Log In dialog. The query string is used to classify the new users as having signed up from the Beekeepers app, as opposed to Pollination app.If the sign up is successful, the Sign Up dialog is closed and the Log In dialog is opened, with a message prompting the user to click the activation link in their email. Once they have activated their account, they can log in with the specified credentials. Upon first log in, any work they have done so far (in terms of apiaries created) are saved to the database.
Connects #326 Connects #328
Demo
Notes
The issue mentions something about enabling Pollination users for Beekeepers. I don't think there's such a separation anymore, so that can be disregarded.
I noticed that when a user is created via this sign up dialog, in the
user_userprofile
table they are still listed as coming from the Pollination app. This is likely because the check for HTTP_REFERRER doesn't correctly capture the querystring parameter or something:https://github.com/project-icp/bee-pollinator-app/blob/3a82e6753d7dc572714e27977b839cd89d936c52/src/icp/apps/user/views.py#L127-L133
When this changes to looking at the domain name, I think this'll fix itself.
"Forgot Password" and "Resend Activation Link" workflows are alluded to, but not implemented herein. That is deferred until later in #402.
The activation link takes the user to the Pollination Mapper app. There's very little content on the page, so I think it's alright for now.
Testing Instructions
beekeepers start
./scripts/debugserver.sh
debugserver
output, find the activation link. Open it.