GitHub PullRequestReviewCommentEvent at 2014-08-11 17:09:43
Repository: api
Actor: Zomega
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/simmons-tech/api/pulls/comments/16065889","id":16065889,"diff_hunk":"@@ -0,0 +1,32 @@\n+import base64\n+import pbkdf2\n+import os\n+import json\n+\n+from db import *\n+\n+# TODO: init_users\n+# TODO init_groups\n+\n+user_db = init('user')\n+user = user_db.query(User).get( 'admin' )\n+if user:\n+\texit() # TODO: Shouldn't exit because other stuff runs below.\n+newuser = User()\n+newuser.username = 'admin'\n+newuser.salt = base64.b64encode( os.urandom(128) )","path":"src/utils/db/init_auth.py","position":17,"original_position":17,"commit_id":"ad638486d6d0ed51f5c8455afe249734e19d4ed2","original_commit_id":"ad638486d6d0ed51f5c8455afe249734e19d4ed2","user":{"login":"Zomega","id":879866,"avatar_url":"https://avatars.githubusercontent.com/u/879866?v=2","gravatar_id":"d54eb62cfea14130f2a26b6d746e92ed","url":"https://api.github.com/users/Zomega","html_url":"https://github.com/Zomega","followers_url":"https://api.github.com/users/Zomega/followers","following_url":"https://api.github.com/users/Zomega/following{/other_user}","gists_url":"https://api.github.com/users/Zomega/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomega/subscriptions","organizations_url":"https://api.github.com/users/Zomega/orgs","repos_url":"https://api.github.com/users/Zomega/repos","events_url":"https://api.github.com/users/Zomega/events{/privacy}","received_events_url":"https://api.github.com/users/Zomega/received_events","type":"User","site_admin":false},"body":"This will be mostly removed once we have SRP; but if it stays around, I'll probalby move most of this code into an auth submodule (there are going to be submodules for each identity provider).\r\n\r\nI dont think salted hashes have use outside of authentication, so I don't think it's appropriate to treat this as a first class utility.","created_at":"2014-08-11T17:09:43Z","updated_at":"2014-08-11T17:09:43Z","html_url":"https://github.com/simmons-tech/api/pull/8#discussion_r16065889","pull_request_url":"https://api.github.com/repos/simmons-tech/api/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/comments/16065889"},"html":{"href":"https://github.com/simmons-tech/api/pull/8#discussion_r16065889"},"pull_request":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/simmons-tech/api/pulls/8","id":19570827,"html_url":"https://github.com/simmons-tech/api/pull/8","diff_url":"https://github.com/simmons-tech/api/pull/8.diff","patch_url":"https://github.com/simmons-tech/api/pull/8.patch","issue_url":"https://api.github.com/repos/simmons-tech/api/issues/8","number":8,"state":"open","title":"Feature/fixcosmosdb","user":{"login":"Zomega","id":879866,"avatar_url":"https://avatars.githubusercontent.com/u/879866?v=2","gravatar_id":"d54eb62cfea14130f2a26b6d746e92ed","url":"https://api.github.com/users/Zomega","html_url":"https://github.com/Zomega","followers_url":"https://api.github.com/users/Zomega/followers","following_url":"https://api.github.com/users/Zomega/following{/other_user}","gists_url":"https://api.github.com/users/Zomega/gists{/gist_id}","starred_url":"https://api.github.com/users/Zomega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zomega/subscriptions","organizations_url":"https://api.github.com/users/Zomega/orgs","repos_url":"https://api.github.com/users/Zomega/repos","events_url":"https://api.github.com/users/Zomega/events{/privacy}","received_events_url":"https://api.github.com/users/Zomega/received_events","type":"User","site_admin":false},"body":"Some things of note here:\r\n\r\nFirst, the high linecount of the new intitialization script is on purpose, while I recognize it's an unorthodox choice, I think it's good to have one entry per line for maintainbility / cleanliness's sake. It doesn't really wrap to 80 chars nice otherwise in a lot of cases.\r\n\r\nSecond, the testing isn't gone (from the project), it's just been split out into another branch, because it needs a lot of help to stop being a very special snowflake indeed. Check out feature/unittesting.\r\n\r\nLastly, let me know if I forgot someone in the contributors file. It's entirely possible I did.","created_at":"2014-08-10T05:12:12Z","updated_at":"2014-08-11T17:09:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d4dd9ddb4fd47260eff5443a4cf6706cf6e79a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/simmons-tech/api/pulls/8/commits","review_comments_url":"https://api.github.com/repos/simmons-tech/api/pulls/8/comments","review_comment_url":"https://api.github.com/repos/simmons-tech/api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/simmons-tech/api/issues/8/comments","statuses_url":"https://api.github.com/repos/simmons-tech/api/statuses/ad638486d6d0ed51f5c8455afe249734e19d4ed2","head":{"label":"simmons-tech:feature/fixcosmosdb","ref":"feature/fixcosmosdb","sha":"ad638486d6d0ed51f5c8455afe249734e19d4ed2","user":{"login":"simmons-tech","id":3759811,"avatar_url":"https://avatars.githubusercontent.com/u/3759811?v=2","gravatar_id":"75bad159f3267db8b3a20c1a2872e8bf","url":"https://api.github.com/users/simmons-tech","html_url":"https://github.com/simmons-tech","followers_url":"https://api.github.com/users/simmons-tech/followers","following_url":"https://api.github.com/users/simmons-tech/following{/other_user}","gists_url":"https://api.github.com/users/simmons-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/simmons-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simmons-tech/subscriptions","organizations_url":"https://api.github.com/users/simmons-tech/orgs","repos_url":"https://api.github.com/users/simmons-tech/repos","events_url":"https://api.github.com/users/simmons-tech/events{/privacy}","received_events_url":"https://api.github.com/users/simmons-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":12682854,"name":"api","full_name":"simmons-tech/api","owner":{"login":"simmons-tech","id":3759811,"avatar_url":"https://avatars.githubusercontent.com/u/3759811?v=2","gravatar_id":"75bad159f3267db8b3a20c1a2872e8bf","url":"https://api.github.com/users/simmons-tech","html_url":"https://github.com/simmons-tech","followers_url":"https://api.github.com/users/simmons-tech/followers","following_url":"https://api.github.com/users/simmons-tech/following{/other_user}","gists_url":"https://api.github.com/users/simmons-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/simmons-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simmons-tech/subscriptions","organizations_url":"https://api.github.com/users/simmons-tech/orgs","repos_url":"https://api.github.com/users/simmons-tech/repos","events_url":"https://api.github.com/users/simmons-tech/events{/privacy}","received_events_url":"https://api.github.com/users/simmons-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simmons-tech/api","description":"Contains a number of APIs. These are avalible to residents at simmons-api.mit.edu.","fork":false,"url":"https://api.github.com/repos/simmons-tech/api","forks_url":"https://api.github.com/repos/simmons-tech/api/forks","keys_url":"https://api.github.com/repos/simmons-tech/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simmons-tech/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simmons-tech/api/teams","hooks_url":"https://api.github.com/repos/simmons-tech/api/hooks","issue_events_url":"https://api.github.com/repos/simmons-tech/api/issues/events{/number}","events_url":"https://api.github.com/repos/simmons-tech/api/events","assignees_url":"https://api.github.com/repos/simmons-tech/api/assignees{/user}","branches_url":"https://api.github.com/repos/simmons-tech/api/branches{/branch}","tags_url":"https://api.github.com/repos/simmons-tech/api/tags","blobs_url":"https://api.github.com/repos/simmons-tech/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simmons-tech/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simmons-tech/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/simmons-tech/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simmons-tech/api/statuses/{sha}","languages_url":"https://api.github.com/repos/simmons-tech/api/languages","stargazers_url":"https://api.github.com/repos/simmons-tech/api/stargazers","contributors_url":"https://api.github.com/repos/simmons-tech/api/contributors","subscribers_url":"https://api.github.com/repos/simmons-tech/api/subscribers","subscription_url":"https://api.github.com/repos/simmons-tech/api/subscription","commits_url":"https://api.github.com/repos/simmons-tech/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/simmons-tech/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/simmons-tech/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/simmons-tech/api/issues/comments/{number}","contents_url":"https://api.github.com/repos/simmons-tech/api/contents/{+path}","compare_url":"https://api.github.com/repos/simmons-tech/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simmons-tech/api/merges","archive_url":"https://api.github.com/repos/simmons-tech/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simmons-tech/api/downloads","issues_url":"https://api.github.com/repos/simmons-tech/api/issues{/number}","pulls_url":"https://api.github.com/repos/simmons-tech/api/pulls{/number}","milestones_url":"https://api.github.com/repos/simmons-tech/api/milestones{/number}","notifications_url":"https://api.github.com/repos/simmons-tech/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simmons-tech/api/labels{/name}","releases_url":"https://api.github.com/repos/simmons-tech/api/releases{/id}","created_at":"2013-09-08T15:31:23Z","updated_at":"2014-07-02T04:18:21Z","pushed_at":"2014-08-10T05:08:32Z","git_url":"git://github.com/simmons-tech/api.git","ssh_url":"git@github.com:simmons-tech/api.git","clone_url":"https://github.com/simmons-tech/api.git","svn_url":"https://github.com/simmons-tech/api","homepage":null,"size":625,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"simmons-tech:master","ref":"master","sha":"2d1937e63d559cab688c46b8c3fb1e94a65382be","user":{"login":"simmons-tech","id":3759811,"avatar_url":"https://avatars.githubusercontent.com/u/3759811?v=2","gravatar_id":"75bad159f3267db8b3a20c1a2872e8bf","url":"https://api.github.com/users/simmons-tech","html_url":"https://github.com/simmons-tech","followers_url":"https://api.github.com/users/simmons-tech/followers","following_url":"https://api.github.com/users/simmons-tech/following{/other_user}","gists_url":"https://api.github.com/users/simmons-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/simmons-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simmons-tech/subscriptions","organizations_url":"https://api.github.com/users/simmons-tech/orgs","repos_url":"https://api.github.com/users/simmons-tech/repos","events_url":"https://api.github.com/users/simmons-tech/events{/privacy}","received_events_url":"https://api.github.com/users/simmons-tech/received_events","type":"Organization","site_admin":false},"repo":{"id":12682854,"name":"api","full_name":"simmons-tech/api","owner":{"login":"simmons-tech","id":3759811,"avatar_url":"https://avatars.githubusercontent.com/u/3759811?v=2","gravatar_id":"75bad159f3267db8b3a20c1a2872e8bf","url":"https://api.github.com/users/simmons-tech","html_url":"https://github.com/simmons-tech","followers_url":"https://api.github.com/users/simmons-tech/followers","following_url":"https://api.github.com/users/simmons-tech/following{/other_user}","gists_url":"https://api.github.com/users/simmons-tech/gists{/gist_id}","starred_url":"https://api.github.com/users/simmons-tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simmons-tech/subscriptions","organizations_url":"https://api.github.com/users/simmons-tech/orgs","repos_url":"https://api.github.com/users/simmons-tech/repos","events_url":"https://api.github.com/users/simmons-tech/events{/privacy}","received_events_url":"https://api.github.com/users/simmons-tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simmons-tech/api","description":"Contains a number of APIs. These are avalible to residents at simmons-api.mit.edu.","fork":false,"url":"https://api.github.com/repos/simmons-tech/api","forks_url":"https://api.github.com/repos/simmons-tech/api/forks","keys_url":"https://api.github.com/repos/simmons-tech/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simmons-tech/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simmons-tech/api/teams","hooks_url":"https://api.github.com/repos/simmons-tech/api/hooks","issue_events_url":"https://api.github.com/repos/simmons-tech/api/issues/events{/number}","events_url":"https://api.github.com/repos/simmons-tech/api/events","assignees_url":"https://api.github.com/repos/simmons-tech/api/assignees{/user}","branches_url":"https://api.github.com/repos/simmons-tech/api/branches{/branch}","tags_url":"https://api.github.com/repos/simmons-tech/api/tags","blobs_url":"https://api.github.com/repos/simmons-tech/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simmons-tech/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simmons-tech/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/simmons-tech/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simmons-tech/api/statuses/{sha}","languages_url":"https://api.github.com/repos/simmons-tech/api/languages","stargazers_url":"https://api.github.com/repos/simmons-tech/api/stargazers","contributors_url":"https://api.github.com/repos/simmons-tech/api/contributors","subscribers_url":"https://api.github.com/repos/simmons-tech/api/subscribers","subscription_url":"https://api.github.com/repos/simmons-tech/api/subscription","commits_url":"https://api.github.com/repos/simmons-tech/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/simmons-tech/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/simmons-tech/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/simmons-tech/api/issues/comments/{number}","contents_url":"https://api.github.com/repos/simmons-tech/api/contents/{+path}","compare_url":"https://api.github.com/repos/simmons-tech/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simmons-tech/api/merges","archive_url":"https://api.github.com/repos/simmons-tech/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simmons-tech/api/downloads","issues_url":"https://api.github.com/repos/simmons-tech/api/issues{/number}","pulls_url":"https://api.github.com/repos/simmons-tech/api/pulls{/number}","milestones_url":"https://api.github.com/repos/simmons-tech/api/milestones{/number}","notifications_url":"https://api.github.com/repos/simmons-tech/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simmons-tech/api/labels{/name}","releases_url":"https://api.github.com/repos/simmons-tech/api/releases{/id}","created_at":"2013-09-08T15:31:23Z","updated_at":"2014-07-02T04:18:21Z","pushed_at":"2014-08-10T05:08:32Z","git_url":"git://github.com/simmons-tech/api.git","ssh_url":"git@github.com:simmons-tech/api.git","clone_url":"https://github.com/simmons-tech/api.git","svn_url":"https://github.com/simmons-tech/api","homepage":null,"size":625,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/8"},"html":{"href":"https://github.com/simmons-tech/api/pull/8"},"issue":{"href":"https://api.github.com/repos/simmons-tech/api/issues/8"},"comments":{"href":"https://api.github.com/repos/simmons-tech/api/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/simmons-tech/api/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/simmons-tech/api/statuses/ad638486d6d0ed51f5c8455afe249734e19d4ed2"}}}}