{"action":"created","comment":{"url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/comments/170006937","pull_request_review_id":98620224,"id":170006937,"diff_hunk":"@@ -34,13 +35,27 @@ public Agent createAgent(Request req, Response res) throws FailedRequestExceptio\n     }\r\n \r\n     public Agent readAgent(Request req, Response res, int id) throws FailedRequestException {\r\n+        int userId = req.attribute(\"user_id\");\r\n+        if(id!=userId){\r\n+            throw new FailedRequestException(ErrorCode.INVALID_CREDENTIALS, \"User not authorised\");\r\n+        }\r","path":"AgentDiscoveries-Backend/src/main/java/org/softwire/training/api/routes/v1/AgentsRoutes.java","position":15,"original_position":15,"commit_id":"a87118617d7b379b702d1450b9f301832f5aa0c8","original_commit_id":"065936d3508fe6c53a68ffbea5ed6bea8864d658","user":{"login":"Joe-Edwards","id":9695026,"avatar_url":"https://avatars1.githubusercontent.com/u/9695026?v=4","gravatar_id":"","url":"https://api.github.com/users/Joe-Edwards","html_url":"https://github.com/Joe-Edwards","followers_url":"https://api.github.com/users/Joe-Edwards/followers","following_url":"https://api.github.com/users/Joe-Edwards/following{/other_user}","gists_url":"https://api.github.com/users/Joe-Edwards/gists{/gist_id}","starred_url":"https://api.github.com/users/Joe-Edwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joe-Edwards/subscriptions","organizations_url":"https://api.github.com/users/Joe-Edwards/orgs","repos_url":"https://api.github.com/users/Joe-Edwards/repos","events_url":"https://api.github.com/users/Joe-Edwards/events{/privacy}","received_events_url":"https://api.github.com/users/Joe-Edwards/received_events","type":"User","site_admin":false},"body":"OK thanks!","created_at":"2018-02-22T16:05:13Z","updated_at":"2018-02-22T16:50:54Z","html_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10#discussion_r170006937","pull_request_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/comments/170006937"},"html":{"href":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10#discussion_r170006937"},"pull_request":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10"}},"in_reply_to_id":169589159},"pull_request":{"url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10","id":170425724,"html_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10","diff_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10.diff","patch_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10.patch","issue_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/10","number":10,"state":"open","locked":false,"title":"User profile updates","user":{"login":"JackMead","id":31657357,"avatar_url":"https://avatars3.githubusercontent.com/u/31657357?v=4","gravatar_id":"","url":"https://api.github.com/users/JackMead","html_url":"https://github.com/JackMead","followers_url":"https://api.github.com/users/JackMead/followers","following_url":"https://api.github.com/users/JackMead/following{/other_user}","gists_url":"https://api.github.com/users/JackMead/gists{/gist_id}","starred_url":"https://api.github.com/users/JackMead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackMead/subscriptions","organizations_url":"https://api.github.com/users/JackMead/orgs","repos_url":"https://api.github.com/users/JackMead/repos","events_url":"https://api.github.com/users/JackMead/events{/privacy}","received_events_url":"https://api.github.com/users/JackMead/received_events","type":"User","site_admin":false},"body":"Branch to add functionality for agents to change their call signs and have a profile picture (currently only shown on the profile page, but...!)","created_at":"2018-02-21T10:14:13Z","updated_at":"2018-02-22T16:50:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10/commits","review_comments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10/comments","review_comment_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/10/comments","statuses_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/statuses/a87118617d7b379b702d1450b9f301832f5aa0c8","head":{"label":"CorndelWithSoftwire:user-profile-updates","ref":"user-profile-updates","sha":"a87118617d7b379b702d1450b9f301832f5aa0c8","user":{"login":"CorndelWithSoftwire","id":25741298,"avatar_url":"https://avatars2.githubusercontent.com/u/25741298?v=4","gravatar_id":"","url":"https://api.github.com/users/CorndelWithSoftwire","html_url":"https://github.com/CorndelWithSoftwire","followers_url":"https://api.github.com/users/CorndelWithSoftwire/followers","following_url":"https://api.github.com/users/CorndelWithSoftwire/following{/other_user}","gists_url":"https://api.github.com/users/CorndelWithSoftwire/gists{/gist_id}","starred_url":"https://api.github.com/users/CorndelWithSoftwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorndelWithSoftwire/subscriptions","organizations_url":"https://api.github.com/users/CorndelWithSoftwire/orgs","repos_url":"https://api.github.com/users/CorndelWithSoftwire/repos","events_url":"https://api.github.com/users/CorndelWithSoftwire/events{/privacy}","received_events_url":"https://api.github.com/users/CorndelWithSoftwire/received_events","type":"Organization","site_admin":false},"repo":{"id":120322114,"name":"AgentDiscoveriesApp-Java","full_name":"CorndelWithSoftwire/AgentDiscoveriesApp-Java","owner":{"login":"CorndelWithSoftwire","id":25741298,"avatar_url":"https://avatars2.githubusercontent.com/u/25741298?v=4","gravatar_id":"","url":"https://api.github.com/users/CorndelWithSoftwire","html_url":"https://github.com/CorndelWithSoftwire","followers_url":"https://api.github.com/users/CorndelWithSoftwire/followers","following_url":"https://api.github.com/users/CorndelWithSoftwire/following{/other_user}","gists_url":"https://api.github.com/users/CorndelWithSoftwire/gists{/gist_id}","starred_url":"https://api.github.com/users/CorndelWithSoftwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorndelWithSoftwire/subscriptions","organizations_url":"https://api.github.com/users/CorndelWithSoftwire/orgs","repos_url":"https://api.github.com/users/CorndelWithSoftwire/repos","events_url":"https://api.github.com/users/CorndelWithSoftwire/events{/privacy}","received_events_url":"https://api.github.com/users/CorndelWithSoftwire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java","description":"Training Project","fork":false,"url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java","forks_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/forks","keys_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/teams","hooks_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/hooks","issue_events_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/events{/number}","events_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/events","assignees_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/assignees{/user}","branches_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/branches{/branch}","tags_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/tags","blobs_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/statuses/{sha}","languages_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/languages","stargazers_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/stargazers","contributors_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/contributors","subscribers_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/subscribers","subscription_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/subscription","commits_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/contents/{+path}","compare_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/merges","archive_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/downloads","issues_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues{/number}","pulls_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls{/number}","milestones_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/milestones{/number}","notifications_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/labels{/name}","releases_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/releases{/id}","deployments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/deployments","created_at":"2018-02-05T15:20:20Z","updated_at":"2018-02-05T15:21:44Z","pushed_at":"2018-02-22T16:26:28Z","git_url":"git://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","ssh_url":"git@github.com:CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","clone_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","svn_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java","homepage":null,"size":587,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"CorndelWithSoftwire:master","ref":"master","sha":"90b99cc3db5e5afc0bd0f54d8208a13519b60b62","user":{"login":"CorndelWithSoftwire","id":25741298,"avatar_url":"https://avatars2.githubusercontent.com/u/25741298?v=4","gravatar_id":"","url":"https://api.github.com/users/CorndelWithSoftwire","html_url":"https://github.com/CorndelWithSoftwire","followers_url":"https://api.github.com/users/CorndelWithSoftwire/followers","following_url":"https://api.github.com/users/CorndelWithSoftwire/following{/other_user}","gists_url":"https://api.github.com/users/CorndelWithSoftwire/gists{/gist_id}","starred_url":"https://api.github.com/users/CorndelWithSoftwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorndelWithSoftwire/subscriptions","organizations_url":"https://api.github.com/users/CorndelWithSoftwire/orgs","repos_url":"https://api.github.com/users/CorndelWithSoftwire/repos","events_url":"https://api.github.com/users/CorndelWithSoftwire/events{/privacy}","received_events_url":"https://api.github.com/users/CorndelWithSoftwire/received_events","type":"Organization","site_admin":false},"repo":{"id":120322114,"name":"AgentDiscoveriesApp-Java","full_name":"CorndelWithSoftwire/AgentDiscoveriesApp-Java","owner":{"login":"CorndelWithSoftwire","id":25741298,"avatar_url":"https://avatars2.githubusercontent.com/u/25741298?v=4","gravatar_id":"","url":"https://api.github.com/users/CorndelWithSoftwire","html_url":"https://github.com/CorndelWithSoftwire","followers_url":"https://api.github.com/users/CorndelWithSoftwire/followers","following_url":"https://api.github.com/users/CorndelWithSoftwire/following{/other_user}","gists_url":"https://api.github.com/users/CorndelWithSoftwire/gists{/gist_id}","starred_url":"https://api.github.com/users/CorndelWithSoftwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorndelWithSoftwire/subscriptions","organizations_url":"https://api.github.com/users/CorndelWithSoftwire/orgs","repos_url":"https://api.github.com/users/CorndelWithSoftwire/repos","events_url":"https://api.github.com/users/CorndelWithSoftwire/events{/privacy}","received_events_url":"https://api.github.com/users/CorndelWithSoftwire/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java","description":"Training Project","fork":false,"url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java","forks_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/forks","keys_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/teams","hooks_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/hooks","issue_events_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/events{/number}","events_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/events","assignees_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/assignees{/user}","branches_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/branches{/branch}","tags_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/tags","blobs_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/statuses/{sha}","languages_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/languages","stargazers_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/stargazers","contributors_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/contributors","subscribers_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/subscribers","subscription_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/subscription","commits_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/contents/{+path}","compare_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/merges","archive_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/downloads","issues_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues{/number}","pulls_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls{/number}","milestones_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/milestones{/number}","notifications_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/labels{/name}","releases_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/releases{/id}","deployments_url":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/deployments","created_at":"2018-02-05T15:20:20Z","updated_at":"2018-02-05T15:21:44Z","pushed_at":"2018-02-22T16:26:28Z","git_url":"git://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","ssh_url":"git@github.com:CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","clone_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java.git","svn_url":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java","homepage":null,"size":587,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10"},"html":{"href":"https://github.com/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pull/10"},"issue":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/10"},"comments":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/CorndelWithSoftwire/AgentDiscoveriesApp-Java/statuses/a87118617d7b379b702d1450b9f301832f5aa0c8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Joe-Edwards"}}