{"action":"created","comment":{"url":"https://api.github.com/repos/hypothesis/h/pulls/comments/203478553","pull_request_review_id":138375781,"id":203478553,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzQ3ODU1Mw==","diff_hunk":"@@ -183,6 +185,78 @@ def test_it_returns_text_type(self, pyramid_request):\n         assert type(util.authority(pyramid_request)) == text_type\n \n \n+class TestValidateAuthClientAuthority(object):\n+\n+    def test_raises_when_authority_doesnt_match(self, pyramid_request, auth_client):","path":"tests/h/auth/util_test.py","position":17,"original_position":17,"commit_id":"97227ed971c6baaac207e00b2f5934303fc11562","original_commit_id":"97227ed971c6baaac207e00b2f5934303fc11562","user":{"login":"lyzadanger","id":439947,"node_id":"MDQ6VXNlcjQzOTk0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/439947?v=4","gravatar_id":"","url":"https://api.github.com/users/lyzadanger","html_url":"https://github.com/lyzadanger","followers_url":"https://api.github.com/users/lyzadanger/followers","following_url":"https://api.github.com/users/lyzadanger/following{/other_user}","gists_url":"https://api.github.com/users/lyzadanger/gists{/gist_id}","starred_url":"https://api.github.com/users/lyzadanger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyzadanger/subscriptions","organizations_url":"https://api.github.com/users/lyzadanger/orgs","repos_url":"https://api.github.com/users/lyzadanger/repos","events_url":"https://api.github.com/users/lyzadanger/events{/privacy}","received_events_url":"https://api.github.com/users/lyzadanger/received_events","type":"User","site_admin":false},"body":"I think we should add an additional test here—the existing test tests for a failure path, but there's no happy path test. Could you add a test that it allows when the authority _does_ match? Thanks!","created_at":"2018-07-18T18:11:55Z","updated_at":"2018-07-18T18:39:05Z","html_url":"https://github.com/hypothesis/h/pull/5166#discussion_r203478553","pull_request_url":"https://api.github.com/repos/hypothesis/h/pulls/5166","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hypothesis/h/pulls/comments/203478553"},"html":{"href":"https://github.com/hypothesis/h/pull/5166#discussion_r203478553"},"pull_request":{"href":"https://api.github.com/repos/hypothesis/h/pulls/5166"}}},"pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/5166","id":202125606,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMTI1NjA2","html_url":"https://github.com/hypothesis/h/pull/5166","diff_url":"https://github.com/hypothesis/h/pull/5166.diff","patch_url":"https://github.com/hypothesis/h/pull/5166.patch","issue_url":"https://api.github.com/repos/hypothesis/h/issues/5166","number":5166,"state":"open","locked":false,"title":"Move auth_client logic to a common and more reusable place.","user":{"login":"sheetaluk","id":502186,"node_id":"MDQ6VXNlcjUwMjE4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/502186?v=4","gravatar_id":"","url":"https://api.github.com/users/sheetaluk","html_url":"https://github.com/sheetaluk","followers_url":"https://api.github.com/users/sheetaluk/followers","following_url":"https://api.github.com/users/sheetaluk/following{/other_user}","gists_url":"https://api.github.com/users/sheetaluk/gists{/gist_id}","starred_url":"https://api.github.com/users/sheetaluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheetaluk/subscriptions","organizations_url":"https://api.github.com/users/sheetaluk/orgs","repos_url":"https://api.github.com/users/sheetaluk/repos","events_url":"https://api.github.com/users/sheetaluk/events{/privacy}","received_events_url":"https://api.github.com/users/sheetaluk/received_events","type":"User","site_admin":false},"body":"Refactor auth_client logic out of h.views.api.users and into h.auth.util so that it is reusable from other places.\r\nThis is the first step towards implementing a new `POST /groups/{id}/members/{user_id}` API endpoint which will be an auth_client endpoint i.e only \"blessed\" auth clients should be able to use it, and operate on users and groups within their authority.\r\nSee https://github.com/hypothesis/product-backlog/issues/707","created_at":"2018-07-18T02:58:33Z","updated_at":"2018-07-18T18:39:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68f0244b58bef8ee15fc22f063623f45ab453f89","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hypothesis/h/pulls/5166/commits","review_comments_url":"https://api.github.com/repos/hypothesis/h/pulls/5166/comments","review_comment_url":"https://api.github.com/repos/hypothesis/h/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/5166/comments","statuses_url":"https://api.github.com/repos/hypothesis/h/statuses/97227ed971c6baaac207e00b2f5934303fc11562","head":{"label":"hypothesis:move-req-auth-client","ref":"move-req-auth-client","sha":"97227ed971c6baaac207e00b2f5934303fc11562","user":{"login":"hypothesis","id":1243215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDMyMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1243215?v=4","gravatar_id":"","url":"https://api.github.com/users/hypothesis","html_url":"https://github.com/hypothesis","followers_url":"https://api.github.com/users/hypothesis/followers","following_url":"https://api.github.com/users/hypothesis/following{/other_user}","gists_url":"https://api.github.com/users/hypothesis/gists{/gist_id}","starred_url":"https://api.github.com/users/hypothesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypothesis/subscriptions","organizations_url":"https://api.github.com/users/hypothesis/orgs","repos_url":"https://api.github.com/users/hypothesis/repos","events_url":"https://api.github.com/users/hypothesis/events{/privacy}","received_events_url":"https://api.github.com/users/hypothesis/received_events","type":"Organization","site_admin":false},"repo":{"id":3910945,"node_id":"MDEwOlJlcG9zaXRvcnkzOTEwOTQ1","name":"h","full_name":"hypothesis/h","owner":{"login":"hypothesis","id":1243215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDMyMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1243215?v=4","gravatar_id":"","url":"https://api.github.com/users/hypothesis","html_url":"https://github.com/hypothesis","followers_url":"https://api.github.com/users/hypothesis/followers","following_url":"https://api.github.com/users/hypothesis/following{/other_user}","gists_url":"https://api.github.com/users/hypothesis/gists{/gist_id}","starred_url":"https://api.github.com/users/hypothesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypothesis/subscriptions","organizations_url":"https://api.github.com/users/hypothesis/orgs","repos_url":"https://api.github.com/users/hypothesis/repos","events_url":"https://api.github.com/users/hypothesis/events{/privacy}","received_events_url":"https://api.github.com/users/hypothesis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hypothesis/h","description":"Annotate with anyone, anywhere.","fork":false,"url":"https://api.github.com/repos/hypothesis/h","forks_url":"https://api.github.com/repos/hypothesis/h/forks","keys_url":"https://api.github.com/repos/hypothesis/h/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hypothesis/h/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hypothesis/h/teams","hooks_url":"https://api.github.com/repos/hypothesis/h/hooks","issue_events_url":"https://api.github.com/repos/hypothesis/h/issues/events{/number}","events_url":"https://api.github.com/repos/hypothesis/h/events","assignees_url":"https://api.github.com/repos/hypothesis/h/assignees{/user}","branches_url":"https://api.github.com/repos/hypothesis/h/branches{/branch}","tags_url":"https://api.github.com/repos/hypothesis/h/tags","blobs_url":"https://api.github.com/repos/hypothesis/h/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hypothesis/h/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hypothesis/h/git/refs{/sha}","trees_url":"https://api.github.com/repos/hypothesis/h/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hypothesis/h/statuses/{sha}","languages_url":"https://api.github.com/repos/hypothesis/h/languages","stargazers_url":"https://api.github.com/repos/hypothesis/h/stargazers","contributors_url":"https://api.github.com/repos/hypothesis/h/contributors","subscribers_url":"https://api.github.com/repos/hypothesis/h/subscribers","subscription_url":"https://api.github.com/repos/hypothesis/h/subscription","commits_url":"https://api.github.com/repos/hypothesis/h/commits{/sha}","git_commits_url":"https://api.github.com/repos/hypothesis/h/git/commits{/sha}","comments_url":"https://api.github.com/repos/hypothesis/h/comments{/number}","issue_comment_url":"https://api.github.com/repos/hypothesis/h/issues/comments{/number}","contents_url":"https://api.github.com/repos/hypothesis/h/contents/{+path}","compare_url":"https://api.github.com/repos/hypothesis/h/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hypothesis/h/merges","archive_url":"https://api.github.com/repos/hypothesis/h/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hypothesis/h/downloads","issues_url":"https://api.github.com/repos/hypothesis/h/issues{/number}","pulls_url":"https://api.github.com/repos/hypothesis/h/pulls{/number}","milestones_url":"https://api.github.com/repos/hypothesis/h/milestones{/number}","notifications_url":"https://api.github.com/repos/hypothesis/h/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hypothesis/h/labels{/name}","releases_url":"https://api.github.com/repos/hypothesis/h/releases{/id}","deployments_url":"https://api.github.com/repos/hypothesis/h/deployments","created_at":"2012-04-02T19:56:59Z","updated_at":"2018-07-18T15:26:53Z","pushed_at":"2018-07-18T17:57:15Z","git_url":"git://github.com/hypothesis/h.git","ssh_url":"git@github.com:hypothesis/h.git","clone_url":"https://github.com/hypothesis/h.git","svn_url":"https://github.com/hypothesis/h","homepage":"https://hypothes.is/","size":30072,"stargazers_count":1170,"watchers_count":1170,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":261,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":261,"open_issues":74,"watchers":1170,"default_branch":"master"}},"base":{"label":"hypothesis:master","ref":"master","sha":"8410ff35150ea600c02458e4558a67db7c926816","user":{"login":"hypothesis","id":1243215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDMyMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1243215?v=4","gravatar_id":"","url":"https://api.github.com/users/hypothesis","html_url":"https://github.com/hypothesis","followers_url":"https://api.github.com/users/hypothesis/followers","following_url":"https://api.github.com/users/hypothesis/following{/other_user}","gists_url":"https://api.github.com/users/hypothesis/gists{/gist_id}","starred_url":"https://api.github.com/users/hypothesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypothesis/subscriptions","organizations_url":"https://api.github.com/users/hypothesis/orgs","repos_url":"https://api.github.com/users/hypothesis/repos","events_url":"https://api.github.com/users/hypothesis/events{/privacy}","received_events_url":"https://api.github.com/users/hypothesis/received_events","type":"Organization","site_admin":false},"repo":{"id":3910945,"node_id":"MDEwOlJlcG9zaXRvcnkzOTEwOTQ1","name":"h","full_name":"hypothesis/h","owner":{"login":"hypothesis","id":1243215,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNDMyMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1243215?v=4","gravatar_id":"","url":"https://api.github.com/users/hypothesis","html_url":"https://github.com/hypothesis","followers_url":"https://api.github.com/users/hypothesis/followers","following_url":"https://api.github.com/users/hypothesis/following{/other_user}","gists_url":"https://api.github.com/users/hypothesis/gists{/gist_id}","starred_url":"https://api.github.com/users/hypothesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypothesis/subscriptions","organizations_url":"https://api.github.com/users/hypothesis/orgs","repos_url":"https://api.github.com/users/hypothesis/repos","events_url":"https://api.github.com/users/hypothesis/events{/privacy}","received_events_url":"https://api.github.com/users/hypothesis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hypothesis/h","description":"Annotate with anyone, anywhere.","fork":false,"url":"https://api.github.com/repos/hypothesis/h","forks_url":"https://api.github.com/repos/hypothesis/h/forks","keys_url":"https://api.github.com/repos/hypothesis/h/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hypothesis/h/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hypothesis/h/teams","hooks_url":"https://api.github.com/repos/hypothesis/h/hooks","issue_events_url":"https://api.github.com/repos/hypothesis/h/issues/events{/number}","events_url":"https://api.github.com/repos/hypothesis/h/events","assignees_url":"https://api.github.com/repos/hypothesis/h/assignees{/user}","branches_url":"https://api.github.com/repos/hypothesis/h/branches{/branch}","tags_url":"https://api.github.com/repos/hypothesis/h/tags","blobs_url":"https://api.github.com/repos/hypothesis/h/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hypothesis/h/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hypothesis/h/git/refs{/sha}","trees_url":"https://api.github.com/repos/hypothesis/h/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hypothesis/h/statuses/{sha}","languages_url":"https://api.github.com/repos/hypothesis/h/languages","stargazers_url":"https://api.github.com/repos/hypothesis/h/stargazers","contributors_url":"https://api.github.com/repos/hypothesis/h/contributors","subscribers_url":"https://api.github.com/repos/hypothesis/h/subscribers","subscription_url":"https://api.github.com/repos/hypothesis/h/subscription","commits_url":"https://api.github.com/repos/hypothesis/h/commits{/sha}","git_commits_url":"https://api.github.com/repos/hypothesis/h/git/commits{/sha}","comments_url":"https://api.github.com/repos/hypothesis/h/comments{/number}","issue_comment_url":"https://api.github.com/repos/hypothesis/h/issues/comments{/number}","contents_url":"https://api.github.com/repos/hypothesis/h/contents/{+path}","compare_url":"https://api.github.com/repos/hypothesis/h/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hypothesis/h/merges","archive_url":"https://api.github.com/repos/hypothesis/h/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hypothesis/h/downloads","issues_url":"https://api.github.com/repos/hypothesis/h/issues{/number}","pulls_url":"https://api.github.com/repos/hypothesis/h/pulls{/number}","milestones_url":"https://api.github.com/repos/hypothesis/h/milestones{/number}","notifications_url":"https://api.github.com/repos/hypothesis/h/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hypothesis/h/labels{/name}","releases_url":"https://api.github.com/repos/hypothesis/h/releases{/id}","deployments_url":"https://api.github.com/repos/hypothesis/h/deployments","created_at":"2012-04-02T19:56:59Z","updated_at":"2018-07-18T15:26:53Z","pushed_at":"2018-07-18T17:57:15Z","git_url":"git://github.com/hypothesis/h.git","ssh_url":"git@github.com:hypothesis/h.git","clone_url":"https://github.com/hypothesis/h.git","svn_url":"https://github.com/hypothesis/h","homepage":"https://hypothes.is/","size":30072,"stargazers_count":1170,"watchers_count":1170,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":261,"mirror_url":null,"archived":false,"open_issues_count":74,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":261,"open_issues":74,"watchers":1170,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hypothesis/h/pulls/5166"},"html":{"href":"https://github.com/hypothesis/h/pull/5166"},"issue":{"href":"https://api.github.com/repos/hypothesis/h/issues/5166"},"comments":{"href":"https://api.github.com/repos/hypothesis/h/issues/5166/comments"},"review_comments":{"href":"https://api.github.com/repos/hypothesis/h/pulls/5166/comments"},"review_comment":{"href":"https://api.github.com/repos/hypothesis/h/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hypothesis/h/pulls/5166/commits"},"statuses":{"href":"https://api.github.com/repos/hypothesis/h/statuses/97227ed971c6baaac207e00b2f5934303fc11562"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lyzadanger"}}