{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/cans/pulls/comments/238801548","pull_request_review_id":181433410,"id":238801548,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODgwMTU0OA==","diff_hunk":"@@ -38,9 +39,11 @@ class ClientAssessmentHistory extends Component {\n     const clientIdentifier = this.props.clientIdentifier\n     return (\n       <Link to={`/clients/${clientIdentifier}/assessments`}>\n-        <Button size=\"small\" color=\"inherit\" className={'card-header-cans-button'}>\n-          New CANS\n-        </Button>\n+        <AuthBoundary permission={`client:createAssessment:${clientIdentifier}`}>","path":"app/javascript/Application/components/Client/ClientAssessmentHistory.js","position":21,"original_position":21,"commit_id":"c8fc69aacc3a53ed8db6c85b941bc0ba19d2e2c0","original_commit_id":"5f07c429ffc905652e63ec536032cbd0538ee735","user":{"login":"LeonidMarushevskyi","id":3201038,"node_id":"MDQ6VXNlcjMyMDEwMzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3201038?v=4","gravatar_id":"","url":"https://api.github.com/users/LeonidMarushevskyi","html_url":"https://github.com/LeonidMarushevskyi","followers_url":"https://api.github.com/users/LeonidMarushevskyi/followers","following_url":"https://api.github.com/users/LeonidMarushevskyi/following{/other_user}","gists_url":"https://api.github.com/users/LeonidMarushevskyi/gists{/gist_id}","starred_url":"https://api.github.com/users/LeonidMarushevskyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeonidMarushevskyi/subscriptions","organizations_url":"https://api.github.com/users/LeonidMarushevskyi/orgs","repos_url":"https://api.github.com/users/LeonidMarushevskyi/repos","events_url":"https://api.github.com/users/LeonidMarushevskyi/events{/privacy}","received_events_url":"https://api.github.com/users/LeonidMarushevskyi/received_events","type":"User","site_admin":false},"body":"@wmitchell-cambria We actually approach to this solution exactly in the way that all authorization decisions should be made in one place on backend using Security API. On backend all authorization rules are consolidated in Authorizer classes for each type of object and operation https://github.com/ca-cwds/cans-api/tree/master/src/main/java/gov/ca/cwds/cans/security\r\nFrontend just uses Security API to get authorization decisions instead of implementing actual logic which involves security attributes like permission, authorities, county, etc. ","created_at":"2018-12-04T19:18:35Z","updated_at":"2018-12-04T19:18:36Z","html_url":"https://github.com/ca-cwds/cans/pull/321#discussion_r238801548","pull_request_url":"https://api.github.com/repos/ca-cwds/cans/pulls/321","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/comments/238801548"},"html":{"href":"https://github.com/ca-cwds/cans/pull/321#discussion_r238801548"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/321"}},"in_reply_to_id":238740498},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/cans/pulls/321","id":235649526,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1NjQ5NTI2","html_url":"https://github.com/ca-cwds/cans/pull/321","diff_url":"https://github.com/ca-cwds/cans/pull/321.diff","patch_url":"https://github.com/ca-cwds/cans/pull/321.patch","issue_url":"https://api.github.com/repos/ca-cwds/cans/issues/321","number":321,"state":"open","locked":false,"title":"CANS-785 Disable New CANS button if user don't have permissions to create assessment","user":{"login":"vladimirPe","id":1669963,"node_id":"MDQ6VXNlcjE2Njk5NjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1669963?v=4","gravatar_id":"","url":"https://api.github.com/users/vladimirPe","html_url":"https://github.com/vladimirPe","followers_url":"https://api.github.com/users/vladimirPe/followers","following_url":"https://api.github.com/users/vladimirPe/following{/other_user}","gists_url":"https://api.github.com/users/vladimirPe/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimirPe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimirPe/subscriptions","organizations_url":"https://api.github.com/users/vladimirPe/orgs","repos_url":"https://api.github.com/users/vladimirPe/repos","events_url":"https://api.github.com/users/vladimirPe/events{/privacy}","received_events_url":"https://api.github.com/users/vladimirPe/received_events","type":"User","site_admin":false},"body":"## JIRA\r\nhttps://osi-cwds.atlassian.net/browse/CANS-785\r\n\r\n## Description\r\nAuthBoundary component was created\r\n\r\n## Tests\r\n<!--- Please indicate applicable tests -->\r\n- [ ] I used TDD to develop the feature\r\n- [x] I have included unit tests\r\n- [ ] I have included new acceptance tests or modified existing ones\r\n- [ ] I have included other tests\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 code style of this project.\r\n- [x] I ran all my tests locally which were green.\r\n- [x] My code adds no new issues to Code Climate\r\n- [x] I ran all the linters 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 (or bring donuts if I leave things broken), to check linters, 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-12-04T01:28:50Z","updated_at":"2018-12-04T19:18:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e73990d9a3c20eed88a4aeb0e76fcd3852534b5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"denys-davydov","id":11778272,"node_id":"MDQ6VXNlcjExNzc4Mjcy","avatar_url":"https://avatars3.githubusercontent.com/u/11778272?v=4","gravatar_id":"","url":"https://api.github.com/users/denys-davydov","html_url":"https://github.com/denys-davydov","followers_url":"https://api.github.com/users/denys-davydov/followers","following_url":"https://api.github.com/users/denys-davydov/following{/other_user}","gists_url":"https://api.github.com/users/denys-davydov/gists{/gist_id}","starred_url":"https://api.github.com/users/denys-davydov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denys-davydov/subscriptions","organizations_url":"https://api.github.com/users/denys-davydov/orgs","repos_url":"https://api.github.com/users/denys-davydov/repos","events_url":"https://api.github.com/users/denys-davydov/events{/privacy}","received_events_url":"https://api.github.com/users/denys-davydov/received_events","type":"User","site_admin":false},{"login":"zliuwd","id":25130704,"node_id":"MDQ6VXNlcjI1MTMwNzA0","avatar_url":"https://avatars0.githubusercontent.com/u/25130704?v=4","gravatar_id":"","url":"https://api.github.com/users/zliuwd","html_url":"https://github.com/zliuwd","followers_url":"https://api.github.com/users/zliuwd/followers","following_url":"https://api.github.com/users/zliuwd/following{/other_user}","gists_url":"https://api.github.com/users/zliuwd/gists{/gist_id}","starred_url":"https://api.github.com/users/zliuwd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zliuwd/subscriptions","organizations_url":"https://api.github.com/users/zliuwd/orgs","repos_url":"https://api.github.com/users/zliuwd/repos","events_url":"https://api.github.com/users/zliuwd/events{/privacy}","received_events_url":"https://api.github.com/users/zliuwd/received_events","type":"User","site_admin":false},{"login":"nasar-cambria","id":33763164,"node_id":"MDQ6VXNlcjMzNzYzMTY0","avatar_url":"https://avatars0.githubusercontent.com/u/33763164?v=4","gravatar_id":"","url":"https://api.github.com/users/nasar-cambria","html_url":"https://github.com/nasar-cambria","followers_url":"https://api.github.com/users/nasar-cambria/followers","following_url":"https://api.github.com/users/nasar-cambria/following{/other_user}","gists_url":"https://api.github.com/users/nasar-cambria/gists{/gist_id}","starred_url":"https://api.github.com/users/nasar-cambria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nasar-cambria/subscriptions","organizations_url":"https://api.github.com/users/nasar-cambria/orgs","repos_url":"https://api.github.com/users/nasar-cambria/repos","events_url":"https://api.github.com/users/nasar-cambria/events{/privacy}","received_events_url":"https://api.github.com/users/nasar-cambria/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/cans/pulls/321/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/cans/pulls/321/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/cans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/cans/issues/321/comments","statuses_url":"https://api.github.com/repos/ca-cwds/cans/statuses/c8fc69aacc3a53ed8db6c85b941bc0ba19d2e2c0","head":{"label":"ca-cwds:CANS-785","ref":"CANS-785","sha":"c8fc69aacc3a53ed8db6c85b941bc0ba19d2e2c0","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":132033011,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIwMzMwMTE=","name":"cans","full_name":"ca-cwds/cans","private":false,"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},"html_url":"https://github.com/ca-cwds/cans","description":"The CANS application repository","fork":false,"url":"https://api.github.com/repos/ca-cwds/cans","forks_url":"https://api.github.com/repos/ca-cwds/cans/forks","keys_url":"https://api.github.com/repos/ca-cwds/cans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/cans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/cans/teams","hooks_url":"https://api.github.com/repos/ca-cwds/cans/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/cans/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/cans/events","assignees_url":"https://api.github.com/repos/ca-cwds/cans/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/cans/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/cans/tags","blobs_url":"https://api.github.com/repos/ca-cwds/cans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/cans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/cans/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/cans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/cans/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/cans/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/cans/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/cans/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/cans/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/cans/subscription","commits_url":"https://api.github.com/repos/ca-cwds/cans/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/cans/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/cans/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/cans/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/cans/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/cans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/cans/merges","archive_url":"https://api.github.com/repos/ca-cwds/cans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/cans/downloads","issues_url":"https://api.github.com/repos/ca-cwds/cans/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/cans/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/cans/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/cans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/cans/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/cans/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/cans/deployments","created_at":"2018-05-03T18:11:52Z","updated_at":"2018-12-03T23:59:18Z","pushed_at":"2018-12-04T19:14:52Z","git_url":"git://github.com/ca-cwds/cans.git","ssh_url":"git@github.com:ca-cwds/cans.git","clone_url":"https://github.com/ca-cwds/cans.git","svn_url":"https://github.com/ca-cwds/cans","homepage":null,"size":2122,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":3,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"35cd2930736801b6274c6c1ea28686c3c0ab8682","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":132033011,"node_id":"MDEwOlJlcG9zaXRvcnkxMzIwMzMwMTE=","name":"cans","full_name":"ca-cwds/cans","private":false,"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},"html_url":"https://github.com/ca-cwds/cans","description":"The CANS application repository","fork":false,"url":"https://api.github.com/repos/ca-cwds/cans","forks_url":"https://api.github.com/repos/ca-cwds/cans/forks","keys_url":"https://api.github.com/repos/ca-cwds/cans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/cans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/cans/teams","hooks_url":"https://api.github.com/repos/ca-cwds/cans/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/cans/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/cans/events","assignees_url":"https://api.github.com/repos/ca-cwds/cans/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/cans/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/cans/tags","blobs_url":"https://api.github.com/repos/ca-cwds/cans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/cans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/cans/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/cans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/cans/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/cans/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/cans/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/cans/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/cans/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/cans/subscription","commits_url":"https://api.github.com/repos/ca-cwds/cans/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/cans/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/cans/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/cans/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/cans/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/cans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/cans/merges","archive_url":"https://api.github.com/repos/ca-cwds/cans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/cans/downloads","issues_url":"https://api.github.com/repos/ca-cwds/cans/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/cans/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/cans/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/cans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/cans/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/cans/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/cans/deployments","created_at":"2018-05-03T18:11:52Z","updated_at":"2018-12-03T23:59:18Z","pushed_at":"2018-12-04T19:14:52Z","git_url":"git://github.com/ca-cwds/cans.git","ssh_url":"git@github.com:ca-cwds/cans.git","clone_url":"https://github.com/ca-cwds/cans.git","svn_url":"https://github.com/ca-cwds/cans","homepage":null,"size":2122,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":3,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/321"},"html":{"href":"https://github.com/ca-cwds/cans/pull/321"},"issue":{"href":"https://api.github.com/repos/ca-cwds/cans/issues/321"},"comments":{"href":"https://api.github.com/repos/ca-cwds/cans/issues/321/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/321/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/cans/pulls/321/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/cans/statuses/c8fc69aacc3a53ed8db6c85b941bc0ba19d2e2c0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"LeonidMarushevskyi"}}