{"action":"created","comment":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/25829059","id":25829059,"diff_hunk":"@@ -47,6 +47,10 @@ public function get_item( $request ) {\n \t\t\treturn new WP_Error( 'json_comment_invalid_id', __( 'Invalid comment ID.' ), array( 'status' => 404 ) );\n \t\t}\n \n+\t\tif ( ! empty( $request['context'] ) && 'edit' === $request['context'] && ! current_user_can( 'moderate_comments' ) ) {","path":"lib/endpoints/class-wp-json-comments-controller.php","position":4,"original_position":4,"commit_id":"efb41e467506fe4e24f4f2e4b66576f7f5faf64e","original_commit_id":"efb41e467506fe4e24f4f2e4b66576f7f5faf64e","user":{"login":"joehoyle","id":161683,"avatar_url":"https://avatars.githubusercontent.com/u/161683?v=3","gravatar_id":"","url":"https://api.github.com/users/joehoyle","html_url":"https://github.com/joehoyle","followers_url":"https://api.github.com/users/joehoyle/followers","following_url":"https://api.github.com/users/joehoyle/following{/other_user}","gists_url":"https://api.github.com/users/joehoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/joehoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehoyle/subscriptions","organizations_url":"https://api.github.com/users/joehoyle/orgs","repos_url":"https://api.github.com/users/joehoyle/repos","events_url":"https://api.github.com/users/joehoyle/events{/privacy}","received_events_url":"https://api.github.com/users/joehoyle/received_events","type":"User","site_admin":false},"body":"We should move this check to the permissions check callback instead me things now","created_at":"2015-03-05T00:22:21Z","updated_at":"2015-03-05T00:22:21Z","html_url":"https://github.com/WP-API/WP-API/pull/951#discussion_r25829059","pull_request_url":"https://api.github.com/repos/WP-API/WP-API/pulls/951","_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments/25829059"},"html":{"href":"https://github.com/WP-API/WP-API/pull/951#discussion_r25829059"},"pull_request":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/951"}}},"pull_request":{"url":"https://api.github.com/repos/WP-API/WP-API/pulls/951","id":30232666,"html_url":"https://github.com/WP-API/WP-API/pull/951","diff_url":"https://github.com/WP-API/WP-API/pull/951.diff","patch_url":"https://github.com/WP-API/WP-API/pull/951.patch","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/951","number":951,"state":"open","locked":false,"title":"Require `moderate_comments` capability to context=edit a Comment","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"body":"If a comment author created a comment without the `moderate_comments`\r\ncapability, use context=view\r\n\r\nDon't use `edit_comment` capability because `moderate_comments` can be\r\nused to view the Comment list table without granting edit access\r\n\r\nSee #950, #702 ","created_at":"2015-02-28T22:53:36Z","updated_at":"2015-03-05T00:22:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5966f724929c53bc718040415f2c861a8fa852b","assignee":null,"milestone":{"url":"https://api.github.com/repos/WP-API/WP-API/milestones/10","html_url":"https://github.com/WP-API/WP-API/milestones/2.0","labels_url":"https://api.github.com/repos/WP-API/WP-API/milestones/10/labels","id":844496,"number":10,"title":"2.0","description":null,"creator":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"open_issues":97,"closed_issues":161,"state":"open","created_at":"2014-10-29T00:12:18Z","updated_at":"2015-03-05T00:02:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/WP-API/WP-API/pulls/951/commits","review_comments_url":"https://api.github.com/repos/WP-API/WP-API/pulls/951/comments","review_comment_url":"https://api.github.com/repos/WP-API/WP-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/951/comments","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/efb41e467506fe4e24f4f2e4b66576f7f5faf64e","head":{"label":"WP-API:950-get-item-error","ref":"950-get-item-error","sha":"efb41e467506fe4e24f4f2e4b66576f7f5faf64e","user":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"repo":{"id":10420996,"name":"WP-API","full_name":"WP-API/WP-API","owner":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WP-API/WP-API","description":"WP REST API - a JSON-based REST API for WordPress.","fork":false,"url":"https://api.github.com/repos/WP-API/WP-API","forks_url":"https://api.github.com/repos/WP-API/WP-API/forks","keys_url":"https://api.github.com/repos/WP-API/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WP-API/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WP-API/WP-API/teams","hooks_url":"https://api.github.com/repos/WP-API/WP-API/hooks","issue_events_url":"https://api.github.com/repos/WP-API/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/WP-API/WP-API/events","assignees_url":"https://api.github.com/repos/WP-API/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/WP-API/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/WP-API/WP-API/tags","blobs_url":"https://api.github.com/repos/WP-API/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WP-API/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WP-API/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/WP-API/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/WP-API/WP-API/languages","stargazers_url":"https://api.github.com/repos/WP-API/WP-API/stargazers","contributors_url":"https://api.github.com/repos/WP-API/WP-API/contributors","subscribers_url":"https://api.github.com/repos/WP-API/WP-API/subscribers","subscription_url":"https://api.github.com/repos/WP-API/WP-API/subscription","commits_url":"https://api.github.com/repos/WP-API/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/WP-API/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/WP-API/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/WP-API/WP-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/WP-API/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/WP-API/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WP-API/WP-API/merges","archive_url":"https://api.github.com/repos/WP-API/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WP-API/WP-API/downloads","issues_url":"https://api.github.com/repos/WP-API/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/WP-API/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/WP-API/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/WP-API/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WP-API/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/WP-API/WP-API/releases{/id}","created_at":"2013-06-01T10:52:43Z","updated_at":"2015-03-05T00:02:21Z","pushed_at":"2015-03-05T00:18:40Z","git_url":"git://github.com/WP-API/WP-API.git","ssh_url":"git@github.com:WP-API/WP-API.git","clone_url":"https://github.com/WP-API/WP-API.git","svn_url":"https://github.com/WP-API/WP-API","homepage":"http://wp-api.org","size":8803,"stargazers_count":1639,"watchers_count":1639,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":295,"mirror_url":null,"open_issues_count":199,"forks":295,"open_issues":199,"watchers":1639,"default_branch":"develop"}},"base":{"label":"WP-API:develop","ref":"develop","sha":"bb79d5bacdf38f4a97d4842386d214deae6d67f1","user":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"repo":{"id":10420996,"name":"WP-API","full_name":"WP-API/WP-API","owner":{"login":"WP-API","id":5706008,"avatar_url":"https://avatars.githubusercontent.com/u/5706008?v=3","gravatar_id":"","url":"https://api.github.com/users/WP-API","html_url":"https://github.com/WP-API","followers_url":"https://api.github.com/users/WP-API/followers","following_url":"https://api.github.com/users/WP-API/following{/other_user}","gists_url":"https://api.github.com/users/WP-API/gists{/gist_id}","starred_url":"https://api.github.com/users/WP-API/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WP-API/subscriptions","organizations_url":"https://api.github.com/users/WP-API/orgs","repos_url":"https://api.github.com/users/WP-API/repos","events_url":"https://api.github.com/users/WP-API/events{/privacy}","received_events_url":"https://api.github.com/users/WP-API/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WP-API/WP-API","description":"WP REST API - a JSON-based REST API for WordPress.","fork":false,"url":"https://api.github.com/repos/WP-API/WP-API","forks_url":"https://api.github.com/repos/WP-API/WP-API/forks","keys_url":"https://api.github.com/repos/WP-API/WP-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WP-API/WP-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WP-API/WP-API/teams","hooks_url":"https://api.github.com/repos/WP-API/WP-API/hooks","issue_events_url":"https://api.github.com/repos/WP-API/WP-API/issues/events{/number}","events_url":"https://api.github.com/repos/WP-API/WP-API/events","assignees_url":"https://api.github.com/repos/WP-API/WP-API/assignees{/user}","branches_url":"https://api.github.com/repos/WP-API/WP-API/branches{/branch}","tags_url":"https://api.github.com/repos/WP-API/WP-API/tags","blobs_url":"https://api.github.com/repos/WP-API/WP-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WP-API/WP-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WP-API/WP-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/WP-API/WP-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WP-API/WP-API/statuses/{sha}","languages_url":"https://api.github.com/repos/WP-API/WP-API/languages","stargazers_url":"https://api.github.com/repos/WP-API/WP-API/stargazers","contributors_url":"https://api.github.com/repos/WP-API/WP-API/contributors","subscribers_url":"https://api.github.com/repos/WP-API/WP-API/subscribers","subscription_url":"https://api.github.com/repos/WP-API/WP-API/subscription","commits_url":"https://api.github.com/repos/WP-API/WP-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/WP-API/WP-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/WP-API/WP-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/WP-API/WP-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/WP-API/WP-API/contents/{+path}","compare_url":"https://api.github.com/repos/WP-API/WP-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WP-API/WP-API/merges","archive_url":"https://api.github.com/repos/WP-API/WP-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WP-API/WP-API/downloads","issues_url":"https://api.github.com/repos/WP-API/WP-API/issues{/number}","pulls_url":"https://api.github.com/repos/WP-API/WP-API/pulls{/number}","milestones_url":"https://api.github.com/repos/WP-API/WP-API/milestones{/number}","notifications_url":"https://api.github.com/repos/WP-API/WP-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WP-API/WP-API/labels{/name}","releases_url":"https://api.github.com/repos/WP-API/WP-API/releases{/id}","created_at":"2013-06-01T10:52:43Z","updated_at":"2015-03-05T00:02:21Z","pushed_at":"2015-03-05T00:18:40Z","git_url":"git://github.com/WP-API/WP-API.git","ssh_url":"git@github.com:WP-API/WP-API.git","clone_url":"https://github.com/WP-API/WP-API.git","svn_url":"https://github.com/WP-API/WP-API","homepage":"http://wp-api.org","size":8803,"stargazers_count":1639,"watchers_count":1639,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":295,"mirror_url":null,"open_issues_count":199,"forks":295,"open_issues":199,"watchers":1639,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/951"},"html":{"href":"https://github.com/WP-API/WP-API/pull/951"},"issue":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/951"},"comments":{"href":"https://api.github.com/repos/WP-API/WP-API/issues/951/comments"},"review_comments":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/951/comments"},"review_comment":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WP-API/WP-API/pulls/951/commits"},"statuses":{"href":"https://api.github.com/repos/WP-API/WP-API/statuses/efb41e467506fe4e24f4f2e4b66576f7f5faf64e"}}}}