{"action":"created","issue":{"url":"https://api.github.com/repos/ohmage/server/issues/865","labels_url":"https://api.github.com/repos/ohmage/server/issues/865/labels{/name}","comments_url":"https://api.github.com/repos/ohmage/server/issues/865/comments","events_url":"https://api.github.com/repos/ohmage/server/issues/865/events","html_url":"https://github.com/ohmage/server/issues/865","id":111712716,"number":865,"title":"user/setup_request apis","user":{"login":"stevenolen","id":808870,"avatar_url":"https://avatars.githubusercontent.com/u/808870?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenolen","html_url":"https://github.com/stevenolen","followers_url":"https://api.github.com/users/stevenolen/followers","following_url":"https://api.github.com/users/stevenolen/following{/other_user}","gists_url":"https://api.github.com/users/stevenolen/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenolen/subscriptions","organizations_url":"https://api.github.com/users/stevenolen/orgs","repos_url":"https://api.github.com/users/stevenolen/repos","events_url":"https://api.github.com/users/stevenolen/events{/privacy}","received_events_url":"https://api.github.com/users/stevenolen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ohmage/server/milestones/19","html_url":"https://github.com/ohmage/server/milestones/2.18.0","labels_url":"https://api.github.com/repos/ohmage/server/milestones/19/labels","id":1373087,"number":19,"title":"2.18.0","description":"Additional changes relating to the 2.17 release.  Namely bugfixes and extending the user/setup api set now that it is included in the core","creator":{"login":"stevenolen","id":808870,"avatar_url":"https://avatars.githubusercontent.com/u/808870?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenolen","html_url":"https://github.com/stevenolen","followers_url":"https://api.github.com/users/stevenolen/followers","following_url":"https://api.github.com/users/stevenolen/following{/other_user}","gists_url":"https://api.github.com/users/stevenolen/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenolen/subscriptions","organizations_url":"https://api.github.com/users/stevenolen/orgs","repos_url":"https://api.github.com/users/stevenolen/repos","events_url":"https://api.github.com/users/stevenolen/events{/privacy}","received_events_url":"https://api.github.com/users/stevenolen/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-10-23T18:37:09Z","updated_at":"2015-10-26T21:47:25Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-10-15T21:38:14Z","updated_at":"2015-11-13T20:19:51Z","closed_at":null,"body":"In order to fully support user/setup flow, we should append a few apis. API endpoints are just a suggestion..\r\n\r\n  * `user/setup_request/create`\r\n    * This endpoint will accept/store a new pending request for user/setup & class/create privileges. It will also email admin this info if `send_setup_request_notifications = true`\r\n    * Suggested/required parameters: `username`,`email`,`study_start_date`,`study_duration`,`study_user_count`,`study_description`,`organization`.\r\n  * `user/setup_request/read`\r\n    * This endpoint will list all requests known to the server, optionally limiting to only those pending.\r\n    * Suggested parameters for filtering: `username`, `pending`\r\n    * This api will be **admin only**\r\n  * `user/setup_request/update`\r\n    * This endpoint will modify a pending request to `successful`. It will email the address listed in the pending request with usage policy info on successful state change.\r\n    * Suggested parameters: `request_id`, `silent` (which would disable sending the email to user on file, defaults to `false`).\r\n    * This api will be **admin only**\r\n\r\nAdditionally, \r\n  * two (maybe 3) new rows in preferences table: `admin_email` (defaults to root@localhost) and `send_setup_request_notifcations` (defaults to `false`) and `user_setup_policy`?\r\n  * user setup policy text should read:\r\n\r\n```\r\nThe class setup privilege (required for setup of your own participants) comes with more responsibility in the ohmage system. Your receipt of this message confirms your acceptance of this policy.\r\n\r\n  * The user will not share his/her account username and password with anyone under any circumstances. A member of the ohmage project will never ask the user for their password.\r\n  * The user will create classes and add participants only for the purpose of the the study detailed below and will not create classes for other study coordinators.\r\n  * The user will ensure they are logged out of their account before leaving their computer unattended.\r\n  * The user will keep generated accounts and passwords for participants private and share the account information to assigned participants only.\r\n  * ohmage personnel reserve the right to modify or terminate accounts of users at any time for any reason.\r\n```\r\n\r\nThis issue is mainly meant to be living documentation of this feature, so please add whatever I'm missing. @hongsudt @jeroenooms "},"comment":{"url":"https://api.github.com/repos/ohmage/server/issues/comments/156546383","html_url":"https://github.com/ohmage/server/issues/865#issuecomment-156546383","issue_url":"https://api.github.com/repos/ohmage/server/issues/865","id":156546383,"user":{"login":"stevenolen","id":808870,"avatar_url":"https://avatars.githubusercontent.com/u/808870?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenolen","html_url":"https://github.com/stevenolen","followers_url":"https://api.github.com/users/stevenolen/followers","following_url":"https://api.github.com/users/stevenolen/following{/other_user}","gists_url":"https://api.github.com/users/stevenolen/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenolen/subscriptions","organizations_url":"https://api.github.com/users/stevenolen/orgs","repos_url":"https://api.github.com/users/stevenolen/repos","events_url":"https://api.github.com/users/stevenolen/events{/privacy}","received_events_url":"https://api.github.com/users/stevenolen/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T20:19:51Z","updated_at":"2015-11-13T20:19:51Z","body":"`config/read` should stay with a very small footprint, since it's extremely heavily used and should have only the necessary content about the configuration.  with self-reg the policy is found at a seperate endpoint, which I think we can do later on if we'd like to store this state on the server. For now I think it's ok to store the state in the client.\r\n\r\nhttps://github.com/ohmage/server/wiki/Self-Registration#registrationRead"}}