{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/API/pulls/comments/211383574","pull_request_review_id":147792693,"id":211383574,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTM4MzU3NA==","diff_hunk":"@@ -0,0 +1,82 @@\n+package gov.ca.cwds.api.client.access;\n+import org.junit.Before;\n+import org.junit.Test;\n+import static io.restassured.RestAssured.given;\n+import static org.junit.Assert.assertFalse;\n+import gov.ca.cwds.api.FunctionalTest;\n+import gov.ca.cwds.api.builder.HttpRequestHandler;\n+import gov.ca.cwds.rest.authenticate.UserGroup;\n+import gov.ca.cwds.rest.core.Api;\n+import io.restassured.http.ContentType;\n+\n+public class ClientAccessForStaffInStateWithSealedAccess extends FunctionalTest {","path":"src/test/functional/java/gov/ca/cwds/api/client/access/ClientAccessForStaffInStateWithSealedAccess.java","position":12,"original_position":12,"commit_id":"5fa6bc4daf89e1d35179aa9666bcfbe39fe82d5c","original_commit_id":"5fa6bc4daf89e1d35179aa9666bcfbe39fe82d5c","user":{"login":"jimlebeau","id":20210059,"node_id":"MDQ6VXNlcjIwMjEwMDU5","avatar_url":"https://avatars3.githubusercontent.com/u/20210059?v=4","gravatar_id":"","url":"https://api.github.com/users/jimlebeau","html_url":"https://github.com/jimlebeau","followers_url":"https://api.github.com/users/jimlebeau/followers","following_url":"https://api.github.com/users/jimlebeau/following{/other_user}","gists_url":"https://api.github.com/users/jimlebeau/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlebeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlebeau/subscriptions","organizations_url":"https://api.github.com/users/jimlebeau/orgs","repos_url":"https://api.github.com/users/jimlebeau/repos","events_url":"https://api.github.com/users/jimlebeau/events{/privacy}","received_events_url":"https://api.github.com/users/jimlebeau/received_events","type":"User","site_admin":false},"body":"renamed with Test suffix","created_at":"2018-08-20T19:41:20Z","updated_at":"2018-08-20T19:41:21Z","html_url":"https://github.com/ca-cwds/API/pull/674#discussion_r211383574","pull_request_url":"https://api.github.com/repos/ca-cwds/API/pulls/674","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/comments/211383574"},"html":{"href":"https://github.com/ca-cwds/API/pull/674#discussion_r211383574"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/674"}},"in_reply_to_id":211380853},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/API/pulls/674","id":209259658,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MjU5NjU4","html_url":"https://github.com/ca-cwds/API/pull/674","diff_url":"https://github.com/ca-cwds/API/pull/674.diff","patch_url":"https://github.com/ca-cwds/API/pull/674.patch","issue_url":"https://api.github.com/repos/ca-cwds/API/issues/674","number":674,"state":"open","locked":false,"title":"Hot 1959","user":{"login":"jimlebeau","id":20210059,"node_id":"MDQ6VXNlcjIwMjEwMDU5","avatar_url":"https://avatars3.githubusercontent.com/u/20210059?v=4","gravatar_id":"","url":"https://api.github.com/users/jimlebeau","html_url":"https://github.com/jimlebeau","followers_url":"https://api.github.com/users/jimlebeau/followers","following_url":"https://api.github.com/users/jimlebeau/following{/other_user}","gists_url":"https://api.github.com/users/jimlebeau/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlebeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlebeau/subscriptions","organizations_url":"https://api.github.com/users/jimlebeau/orgs","repos_url":"https://api.github.com/users/jimlebeau/repos","events_url":"https://api.github.com/users/jimlebeau/events{/privacy}","received_events_url":"https://api.github.com/users/jimlebeau/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n- HOT-1959 - Save CSEC screening data to CWS/CMS.\r\n- Functional test for /authorize/client{id} end point.\r\n- Refactor RelationshipService.findForIds() to authorize client access before returning relationships.\r\n\r\n## Description\r\n<!--- Provide a description with context for those that don't know what this pull request is about. -->\r\n**HOT-1959**\r\nSave concerns about CSEC from a CARES screening that is submitted to CWS/CMS, so that an investigator can assess CSEC concerns about minors named on the investigation.  This story is for the back-end work only.\r\n\r\n**Functional test for GET /authorize/client{id}**\r\nTest that will verify that a logged in user has authorization to access client information using this end point.  This end-point uses the gov.ca.cwds.rest.services.auth.AuthorizationService.java service to return a status of 200 when authorized (or client does not exist) and a status of 403 when not authorized.\r\n\r\n**RelationshipService.findForIds()**\r\nThis method was refactored so that access authorization is checked before the relationship information is returned from the service.  This service is currently used by the GET /clients/relationships end point.  Previously, client relationship information would always be returned regardless of the users access privilege to the client.\r\n\r\n## Jira Issue link\r\n<!--- Provide the link to Jira -->\r\nhttps://osi-cwds.atlassian.net/browse/HOT-1959\r\n\r\n## Tests\r\n- [X] I have included unit tests \r\n- [X] I have included functional tests \r\n- [ ] I have included other tests \r\n- [ ] I have NOT included tests \r\n<!--- Please indicate why tests were not added. -->\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [X] Refactoring (No behavioral changes)\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. -->\r\n- [X] My code follows the google code style of this project.\r\n- [X] I have ran all tests for the project.\r\n- [X] My code is in a stable state ready to be deployable, but not necessarily complete.\r\n- [X] I promise on my honor as a CWDS developer to ensure I don't break the build, to check SonarQube after the build completes, use best practices, to leave the code in better shape than I found it, and to have a good day.\r\n","created_at":"2018-08-17T21:16:53Z","updated_at":"2018-08-20T19:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"428eb758ab4e1e568702de637eaf3af0b58ffd85","assignee":null,"assignees":[],"requested_reviewers":[{"login":"david-smith-osi","id":20781226,"node_id":"MDQ6VXNlcjIwNzgxMjI2","avatar_url":"https://avatars2.githubusercontent.com/u/20781226?v=4","gravatar_id":"","url":"https://api.github.com/users/david-smith-osi","html_url":"https://github.com/david-smith-osi","followers_url":"https://api.github.com/users/david-smith-osi/followers","following_url":"https://api.github.com/users/david-smith-osi/following{/other_user}","gists_url":"https://api.github.com/users/david-smith-osi/gists{/gist_id}","starred_url":"https://api.github.com/users/david-smith-osi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-smith-osi/subscriptions","organizations_url":"https://api.github.com/users/david-smith-osi/orgs","repos_url":"https://api.github.com/users/david-smith-osi/repos","events_url":"https://api.github.com/users/david-smith-osi/events{/privacy}","received_events_url":"https://api.github.com/users/david-smith-osi/received_events","type":"User","site_admin":false},{"login":"AVandana-OSI","id":20781325,"node_id":"MDQ6VXNlcjIwNzgxMzI1","avatar_url":"https://avatars2.githubusercontent.com/u/20781325?v=4","gravatar_id":"","url":"https://api.github.com/users/AVandana-OSI","html_url":"https://github.com/AVandana-OSI","followers_url":"https://api.github.com/users/AVandana-OSI/followers","following_url":"https://api.github.com/users/AVandana-OSI/following{/other_user}","gists_url":"https://api.github.com/users/AVandana-OSI/gists{/gist_id}","starred_url":"https://api.github.com/users/AVandana-OSI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AVandana-OSI/subscriptions","organizations_url":"https://api.github.com/users/AVandana-OSI/orgs","repos_url":"https://api.github.com/users/AVandana-OSI/repos","events_url":"https://api.github.com/users/AVandana-OSI/events{/privacy}","received_events_url":"https://api.github.com/users/AVandana-OSI/received_events","type":"User","site_admin":false},{"login":"tparkerosi","id":26878568,"node_id":"MDQ6VXNlcjI2ODc4NTY4","avatar_url":"https://avatars3.githubusercontent.com/u/26878568?v=4","gravatar_id":"","url":"https://api.github.com/users/tparkerosi","html_url":"https://github.com/tparkerosi","followers_url":"https://api.github.com/users/tparkerosi/followers","following_url":"https://api.github.com/users/tparkerosi/following{/other_user}","gists_url":"https://api.github.com/users/tparkerosi/gists{/gist_id}","starred_url":"https://api.github.com/users/tparkerosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tparkerosi/subscriptions","organizations_url":"https://api.github.com/users/tparkerosi/orgs","repos_url":"https://api.github.com/users/tparkerosi/repos","events_url":"https://api.github.com/users/tparkerosi/events{/privacy}","received_events_url":"https://api.github.com/users/tparkerosi/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/API/pulls/674/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/API/pulls/674/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/API/issues/674/comments","statuses_url":"https://api.github.com/repos/ca-cwds/API/statuses/5fa6bc4daf89e1d35179aa9666bcfbe39fe82d5c","head":{"label":"ca-cwds:HOT-1959","ref":"HOT-1959","sha":"5fa6bc4daf89e1d35179aa9666bcfbe39fe82d5c","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":47909509,"node_id":"MDEwOlJlcG9zaXRvcnk0NzkwOTUwOQ==","name":"API","full_name":"ca-cwds/API","owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/API","description":"Application Program Interface","fork":false,"url":"https://api.github.com/repos/ca-cwds/API","forks_url":"https://api.github.com/repos/ca-cwds/API/forks","keys_url":"https://api.github.com/repos/ca-cwds/API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/API/teams","hooks_url":"https://api.github.com/repos/ca-cwds/API/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/API/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/API/events","assignees_url":"https://api.github.com/repos/ca-cwds/API/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/API/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/API/tags","blobs_url":"https://api.github.com/repos/ca-cwds/API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/API/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/API/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/API/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/API/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/API/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/API/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/API/subscription","commits_url":"https://api.github.com/repos/ca-cwds/API/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/API/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/API/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/API/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/API/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/API/merges","archive_url":"https://api.github.com/repos/ca-cwds/API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/API/downloads","issues_url":"https://api.github.com/repos/ca-cwds/API/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/API/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/API/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/API/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/API/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/API/deployments","created_at":"2015-12-13T07:04:26Z","updated_at":"2018-08-20T18:51:13Z","pushed_at":"2018-08-20T18:51:11Z","git_url":"git://github.com/ca-cwds/API.git","ssh_url":"git@github.com:ca-cwds/API.git","clone_url":"https://github.com/ca-cwds/API.git","svn_url":"https://github.com/ca-cwds/API","homepage":null,"size":35725,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":7,"open_issues":3,"watchers":12,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"8cc231036fdb2205502b76339a3c656a0de2679f","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":47909509,"node_id":"MDEwOlJlcG9zaXRvcnk0NzkwOTUwOQ==","name":"API","full_name":"ca-cwds/API","owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ca-cwds/API","description":"Application Program Interface","fork":false,"url":"https://api.github.com/repos/ca-cwds/API","forks_url":"https://api.github.com/repos/ca-cwds/API/forks","keys_url":"https://api.github.com/repos/ca-cwds/API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/API/teams","hooks_url":"https://api.github.com/repos/ca-cwds/API/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/API/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/API/events","assignees_url":"https://api.github.com/repos/ca-cwds/API/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/API/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/API/tags","blobs_url":"https://api.github.com/repos/ca-cwds/API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/API/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/API/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/API/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/API/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/API/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/API/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/API/subscription","commits_url":"https://api.github.com/repos/ca-cwds/API/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/API/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/API/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/API/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/API/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/API/merges","archive_url":"https://api.github.com/repos/ca-cwds/API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/API/downloads","issues_url":"https://api.github.com/repos/ca-cwds/API/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/API/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/API/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/API/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/API/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/API/deployments","created_at":"2015-12-13T07:04:26Z","updated_at":"2018-08-20T18:51:13Z","pushed_at":"2018-08-20T18:51:11Z","git_url":"git://github.com/ca-cwds/API.git","ssh_url":"git@github.com:ca-cwds/API.git","clone_url":"https://github.com/ca-cwds/API.git","svn_url":"https://github.com/ca-cwds/API","homepage":null,"size":35725,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":7,"open_issues":3,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/674"},"html":{"href":"https://github.com/ca-cwds/API/pull/674"},"issue":{"href":"https://api.github.com/repos/ca-cwds/API/issues/674"},"comments":{"href":"https://api.github.com/repos/ca-cwds/API/issues/674/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/674/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/API/pulls/674/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/API/statuses/5fa6bc4daf89e1d35179aa9666bcfbe39fe82d5c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jimlebeau"}}