{"action":"created","comment":{"url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/comments/245256743","pull_request_review_id":189313655,"id":245256743,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTI1Njc0Mw==","diff_hunk":"@@ -2,4 +2,11 @@ class InvestigationPolicy < ApplicationPolicy\n   def destroy?\n     @user.has_role? :admin\n   end\n+\n+  def visible?","path":"mspsds-web/app/policies/investigation_policy.rb","position":5,"original_position":5,"commit_id":"09ca8102312a2155a45a013a5f1a03c1395217c7","original_commit_id":"09ca8102312a2155a45a013a5f1a03c1395217c7","user":{"login":"broder","id":14093913,"node_id":"MDQ6VXNlcjE0MDkzOTEz","avatar_url":"https://avatars3.githubusercontent.com/u/14093913?v=4","gravatar_id":"","url":"https://api.github.com/users/broder","html_url":"https://github.com/broder","followers_url":"https://api.github.com/users/broder/followers","following_url":"https://api.github.com/users/broder/following{/other_user}","gists_url":"https://api.github.com/users/broder/gists{/gist_id}","starred_url":"https://api.github.com/users/broder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broder/subscriptions","organizations_url":"https://api.github.com/users/broder/orgs","repos_url":"https://api.github.com/users/broder/repos","events_url":"https://api.github.com/users/broder/events{/privacy}","received_events_url":"https://api.github.com/users/broder/received_events","type":"User","site_admin":false},"body":"Should we call this `show?` to be consistent with the other pundit policies?","created_at":"2019-01-04T10:07:51Z","updated_at":"2019-01-04T10:13:35Z","html_url":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421#discussion_r245256743","pull_request_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/comments/245256743"},"html":{"href":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421#discussion_r245256743"},"pull_request":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421"}}},"pull_request":{"url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421","id":240242813,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjQyODEz","html_url":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421","diff_url":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421.diff","patch_url":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421.patch","issue_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/421","number":421,"state":"open","locked":false,"title":"MSPSDS-530: Restrict case legal reasons","user":{"login":"kicferk1","id":42969249,"node_id":"MDQ6VXNlcjQyOTY5MjQ5","avatar_url":"https://avatars3.githubusercontent.com/u/42969249?v=4","gravatar_id":"","url":"https://api.github.com/users/kicferk1","html_url":"https://github.com/kicferk1","followers_url":"https://api.github.com/users/kicferk1/followers","following_url":"https://api.github.com/users/kicferk1/following{/other_user}","gists_url":"https://api.github.com/users/kicferk1/gists{/gist_id}","starred_url":"https://api.github.com/users/kicferk1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kicferk1/subscriptions","organizations_url":"https://api.github.com/users/kicferk1/orgs","repos_url":"https://api.github.com/users/kicferk1/repos","events_url":"https://api.github.com/users/kicferk1/events{/privacy}","received_events_url":"https://api.github.com/users/kicferk1/received_events","type":"User","site_admin":false},"body":"Blocked by designs. \r\nNeed to know what to display when someone who is not supposed to see tries to access website.\r\nNeed to know what activity for changing visibility looks like.\r\n\r\nCurrently access criteria is based on users, needs to be updated to organisations(hopefully as part of a separate ticket). \r\n\r\nWe use a filter on elasticsearch query to not return sensitive cases unless users are whitelisted. For parts of project that use rails relations to get cases instead, we compute visibility of cases on the fly.","created_at":"2018-12-20T17:13:09Z","updated_at":"2019-01-04T10:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d094bcac082d24c7383f137a6d1b812cc2b19ef9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421/commits","review_comments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421/comments","review_comment_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/421/comments","statuses_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/statuses/09ca8102312a2155a45a013a5f1a03c1395217c7","head":{"label":"UKGovernmentBEIS:MSPSDS-530-restrict-case-legal","ref":"MSPSDS-530-restrict-case-legal","sha":"09ca8102312a2155a45a013a5f1a03c1395217c7","user":{"login":"UKGovernmentBEIS","id":19221939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjIxOTM5","avatar_url":"https://avatars3.githubusercontent.com/u/19221939?v=4","gravatar_id":"","url":"https://api.github.com/users/UKGovernmentBEIS","html_url":"https://github.com/UKGovernmentBEIS","followers_url":"https://api.github.com/users/UKGovernmentBEIS/followers","following_url":"https://api.github.com/users/UKGovernmentBEIS/following{/other_user}","gists_url":"https://api.github.com/users/UKGovernmentBEIS/gists{/gist_id}","starred_url":"https://api.github.com/users/UKGovernmentBEIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKGovernmentBEIS/subscriptions","organizations_url":"https://api.github.com/users/UKGovernmentBEIS/orgs","repos_url":"https://api.github.com/users/UKGovernmentBEIS/repos","events_url":"https://api.github.com/users/UKGovernmentBEIS/events{/privacy}","received_events_url":"https://api.github.com/users/UKGovernmentBEIS/received_events","type":"Organization","site_admin":false},"repo":{"id":134414102,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0MTQxMDI=","name":"beis-mspsds","full_name":"UKGovernmentBEIS/beis-mspsds","private":false,"owner":{"login":"UKGovernmentBEIS","id":19221939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjIxOTM5","avatar_url":"https://avatars3.githubusercontent.com/u/19221939?v=4","gravatar_id":"","url":"https://api.github.com/users/UKGovernmentBEIS","html_url":"https://github.com/UKGovernmentBEIS","followers_url":"https://api.github.com/users/UKGovernmentBEIS/followers","following_url":"https://api.github.com/users/UKGovernmentBEIS/following{/other_user}","gists_url":"https://api.github.com/users/UKGovernmentBEIS/gists{/gist_id}","starred_url":"https://api.github.com/users/UKGovernmentBEIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKGovernmentBEIS/subscriptions","organizations_url":"https://api.github.com/users/UKGovernmentBEIS/orgs","repos_url":"https://api.github.com/users/UKGovernmentBEIS/repos","events_url":"https://api.github.com/users/UKGovernmentBEIS/events{/privacy}","received_events_url":"https://api.github.com/users/UKGovernmentBEIS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/UKGovernmentBEIS/beis-mspsds","description":"Market Surveillance and Product Safety Digital Service","fork":false,"url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds","forks_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/forks","keys_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/teams","hooks_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/hooks","issue_events_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/events{/number}","events_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/events","assignees_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/assignees{/user}","branches_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/branches{/branch}","tags_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/tags","blobs_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/statuses/{sha}","languages_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/languages","stargazers_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/stargazers","contributors_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/contributors","subscribers_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/subscribers","subscription_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/subscription","commits_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/contents/{+path}","compare_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/merges","archive_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/downloads","issues_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues{/number}","pulls_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls{/number}","milestones_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/milestones{/number}","notifications_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/labels{/name}","releases_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/releases{/id}","deployments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/deployments","created_at":"2018-05-22T12:48:15Z","updated_at":"2019-01-04T10:10:24Z","pushed_at":"2019-01-04T10:12:35Z","git_url":"git://github.com/UKGovernmentBEIS/beis-mspsds.git","ssh_url":"git@github.com:UKGovernmentBEIS/beis-mspsds.git","clone_url":"https://github.com/UKGovernmentBEIS/beis-mspsds.git","svn_url":"https://github.com/UKGovernmentBEIS/beis-mspsds","homepage":null,"size":3396,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":12,"watchers":1,"default_branch":"master"}},"base":{"label":"UKGovernmentBEIS:master","ref":"master","sha":"7bd3a9d47b2386a1764e6cdfa2a00274ca92a52b","user":{"login":"UKGovernmentBEIS","id":19221939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjIxOTM5","avatar_url":"https://avatars3.githubusercontent.com/u/19221939?v=4","gravatar_id":"","url":"https://api.github.com/users/UKGovernmentBEIS","html_url":"https://github.com/UKGovernmentBEIS","followers_url":"https://api.github.com/users/UKGovernmentBEIS/followers","following_url":"https://api.github.com/users/UKGovernmentBEIS/following{/other_user}","gists_url":"https://api.github.com/users/UKGovernmentBEIS/gists{/gist_id}","starred_url":"https://api.github.com/users/UKGovernmentBEIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKGovernmentBEIS/subscriptions","organizations_url":"https://api.github.com/users/UKGovernmentBEIS/orgs","repos_url":"https://api.github.com/users/UKGovernmentBEIS/repos","events_url":"https://api.github.com/users/UKGovernmentBEIS/events{/privacy}","received_events_url":"https://api.github.com/users/UKGovernmentBEIS/received_events","type":"Organization","site_admin":false},"repo":{"id":134414102,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ0MTQxMDI=","name":"beis-mspsds","full_name":"UKGovernmentBEIS/beis-mspsds","private":false,"owner":{"login":"UKGovernmentBEIS","id":19221939,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjIxOTM5","avatar_url":"https://avatars3.githubusercontent.com/u/19221939?v=4","gravatar_id":"","url":"https://api.github.com/users/UKGovernmentBEIS","html_url":"https://github.com/UKGovernmentBEIS","followers_url":"https://api.github.com/users/UKGovernmentBEIS/followers","following_url":"https://api.github.com/users/UKGovernmentBEIS/following{/other_user}","gists_url":"https://api.github.com/users/UKGovernmentBEIS/gists{/gist_id}","starred_url":"https://api.github.com/users/UKGovernmentBEIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKGovernmentBEIS/subscriptions","organizations_url":"https://api.github.com/users/UKGovernmentBEIS/orgs","repos_url":"https://api.github.com/users/UKGovernmentBEIS/repos","events_url":"https://api.github.com/users/UKGovernmentBEIS/events{/privacy}","received_events_url":"https://api.github.com/users/UKGovernmentBEIS/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/UKGovernmentBEIS/beis-mspsds","description":"Market Surveillance and Product Safety Digital Service","fork":false,"url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds","forks_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/forks","keys_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/teams","hooks_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/hooks","issue_events_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/events{/number}","events_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/events","assignees_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/assignees{/user}","branches_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/branches{/branch}","tags_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/tags","blobs_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/statuses/{sha}","languages_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/languages","stargazers_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/stargazers","contributors_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/contributors","subscribers_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/subscribers","subscription_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/subscription","commits_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/contents/{+path}","compare_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/merges","archive_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/downloads","issues_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues{/number}","pulls_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls{/number}","milestones_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/milestones{/number}","notifications_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/labels{/name}","releases_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/releases{/id}","deployments_url":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/deployments","created_at":"2018-05-22T12:48:15Z","updated_at":"2019-01-04T10:10:24Z","pushed_at":"2019-01-04T10:12:35Z","git_url":"git://github.com/UKGovernmentBEIS/beis-mspsds.git","ssh_url":"git@github.com:UKGovernmentBEIS/beis-mspsds.git","clone_url":"https://github.com/UKGovernmentBEIS/beis-mspsds.git","svn_url":"https://github.com/UKGovernmentBEIS/beis-mspsds","homepage":null,"size":3396,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421"},"html":{"href":"https://github.com/UKGovernmentBEIS/beis-mspsds/pull/421"},"issue":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/421"},"comments":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/issues/421/comments"},"review_comments":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421/comments"},"review_comment":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/pulls/421/commits"},"statuses":{"href":"https://api.github.com/repos/UKGovernmentBEIS/beis-mspsds/statuses/09ca8102312a2155a45a013a5f1a03c1395217c7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"broder"}}