{"action":"created","issue":{"url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/403","repository_url":"https://api.github.com/repos/project-icp/bee-pollinator-app","labels_url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/403/labels{/name}","comments_url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/403/comments","events_url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/403/events","html_url":"https://github.com/project-icp/bee-pollinator-app/pull/403","id":395035738,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNjA0MDE1","number":403,"title":"Implement Sign Up workflow","user":{"login":"rajadain","id":1430060,"node_id":"MDQ6VXNlcjE0MzAwNjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1430060?v=4","gravatar_id":"","url":"https://api.github.com/users/rajadain","html_url":"https://github.com/rajadain","followers_url":"https://api.github.com/users/rajadain/followers","following_url":"https://api.github.com/users/rajadain/following{/other_user}","gists_url":"https://api.github.com/users/rajadain/gists{/gist_id}","starred_url":"https://api.github.com/users/rajadain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajadain/subscriptions","organizations_url":"https://api.github.com/users/rajadain/orgs","repos_url":"https://api.github.com/users/rajadain/repos","events_url":"https://api.github.com/users/rajadain/events{/privacy}","received_events_url":"https://api.github.com/users/rajadain/received_events","type":"User","site_admin":false},"labels":[{"id":1097514778,"node_id":"MDU6TGFiZWwxMDk3NTE0Nzc4","url":"https://api.github.com/repos/project-icp/bee-pollinator-app/labels/beekeepers","name":"beekeepers","color":"FFF176","default":false},{"id":461787874,"node_id":"MDU6TGFiZWw0NjE3ODc4NzQ=","url":"https://api.github.com/repos/project-icp/bee-pollinator-app/labels/in%20progress","name":"in progress","color":"cccccc","default":false}],"state":"open","locked":false,"assignee":{"login":"fungjj92","id":10568752,"node_id":"MDQ6VXNlcjEwNTY4NzUy","avatar_url":"https://avatars1.githubusercontent.com/u/10568752?v=4","gravatar_id":"","url":"https://api.github.com/users/fungjj92","html_url":"https://github.com/fungjj92","followers_url":"https://api.github.com/users/fungjj92/followers","following_url":"https://api.github.com/users/fungjj92/following{/other_user}","gists_url":"https://api.github.com/users/fungjj92/gists{/gist_id}","starred_url":"https://api.github.com/users/fungjj92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fungjj92/subscriptions","organizations_url":"https://api.github.com/users/fungjj92/orgs","repos_url":"https://api.github.com/users/fungjj92/repos","events_url":"https://api.github.com/users/fungjj92/events{/privacy}","received_events_url":"https://api.github.com/users/fungjj92/received_events","type":"User","site_admin":false},"assignees":[{"login":"fungjj92","id":10568752,"node_id":"MDQ6VXNlcjEwNTY4NzUy","avatar_url":"https://avatars1.githubusercontent.com/u/10568752?v=4","gravatar_id":"","url":"https://api.github.com/users/fungjj92","html_url":"https://github.com/fungjj92","followers_url":"https://api.github.com/users/fungjj92/followers","following_url":"https://api.github.com/users/fungjj92/following{/other_user}","gists_url":"https://api.github.com/users/fungjj92/gists{/gist_id}","starred_url":"https://api.github.com/users/fungjj92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fungjj92/subscriptions","organizations_url":"https://api.github.com/users/fungjj92/orgs","repos_url":"https://api.github.com/users/fungjj92/repos","events_url":"https://api.github.com/users/fungjj92/events{/privacy}","received_events_url":"https://api.github.com/users/fungjj92/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-12-31T21:57:02Z","updated_at":"2019-01-03T19:46:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/project-icp/bee-pollinator-app/pulls/403","html_url":"https://github.com/project-icp/bee-pollinator-app/pull/403","diff_url":"https://github.com/project-icp/bee-pollinator-app/pull/403.diff","patch_url":"https://github.com/project-icp/bee-pollinator-app/pull/403.patch"},"body":"## Overview\r\n\r\nExpands 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.\r\n\r\nOnce 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.\r\n\r\nIf 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.\r\n\r\nConnects #326 \r\nConnects #328 \r\n\r\n### Demo\r\n\r\n![2018-12-31 16 39 38](https://user-images.githubusercontent.com/1430060/50568107-2f477100-0d1b-11e9-8f10-ba5302864a8a.gif)\r\n\r\n### Notes\r\n\r\n* 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.\r\n\r\n* 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:\r\n\r\n    https://github.com/project-icp/bee-pollinator-app/blob/3a82e6753d7dc572714e27977b839cd89d936c52/src/icp/apps/user/views.py#L127-L133\r\n\r\n    ```sql\r\n    SELECT username, origin_app\r\n    FROM auth_user u INNER JOIN user_userprofile p ON u.id = p.user_id\r\n    WHERE u.username = 'test4';\r\n    \r\n     username | origin_app  \r\n    ----------+-------------\r\n     test4    | Pollination\r\n    (1 row)\r\n    ```\r\n\r\n    When this changes to looking at the domain name, I think this'll fix itself.\r\n\r\n* \"Forgot Password\" and \"Resend Activation Link\" workflows are alluded to, but not implemented herein. That is deferred until later in #402.\r\n\r\n* 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.\r\n\r\n## Testing Instructions\r\n\r\n* Check out this branch and `beekeepers start`\r\n* Go to [:8000/?beekeepers](http://localhost:8000/?beekeepers) and ensure you are logged out\r\n* Open the sign up dialog and sign up. Try not filling out all fields, making the passwords mismatch, an invalid email, and using a username that already exists. Ensure you get proper error messages for each.\r\n* Run `./scripts/debugserver.sh`\r\n* Fill in valid details in the Sign Up modal. Ensure you are redirected to the Log In dialog.\r\n* Try to log in. Ensure it asks to activate the account first.\r\n* In your `debugserver` output, find the activation link. Open it.\r\n* Try logging in again. Ensure it works correctly.\r\n* Log out, and create some apiaries. Log in again, and ensure those apiaries are still there.\r\n* Refresh the page while logged in and ensure the apiaries are still there.\r\n* Log out, and create some apiaries. Log in again, and ensure you see the apiaries already saved in the account, not the new ones you created while logged out."},"comment":{"url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/comments/451255932","html_url":"https://github.com/project-icp/bee-pollinator-app/pull/403#issuecomment-451255932","issue_url":"https://api.github.com/repos/project-icp/bee-pollinator-app/issues/403","id":451255932,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTI1NTkzMg==","user":{"login":"fungjj92","id":10568752,"node_id":"MDQ6VXNlcjEwNTY4NzUy","avatar_url":"https://avatars1.githubusercontent.com/u/10568752?v=4","gravatar_id":"","url":"https://api.github.com/users/fungjj92","html_url":"https://github.com/fungjj92","followers_url":"https://api.github.com/users/fungjj92/followers","following_url":"https://api.github.com/users/fungjj92/following{/other_user}","gists_url":"https://api.github.com/users/fungjj92/gists{/gist_id}","starred_url":"https://api.github.com/users/fungjj92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fungjj92/subscriptions","organizations_url":"https://api.github.com/users/fungjj92/orgs","repos_url":"https://api.github.com/users/fungjj92/repos","events_url":"https://api.github.com/users/fungjj92/events{/privacy}","received_events_url":"https://api.github.com/users/fungjj92/received_events","type":"User","site_admin":false},"created_at":"2019-01-03T19:46:57Z","updated_at":"2019-01-03T19:46:57Z","author_association":"CONTRIBUTOR","body":"Works well, tested after rebase !"}}
{"actor":{"display_login":"fungjj92"}}