{"action":"created","comment":{"url":"https://api.github.com/repos/instedd/cdx/pulls/comments/48263516","id":48263516,"diff_hunk":"@@ -42,9 +53,35 @@\n         {\n           \"resource\": \"institution/<%= institution_id %>\",\n           \"action\": [\n-            \"institution:read\"\n+            \"institution:read\",\n+            \"institution:readUsers\"\n           ],\n           \"delegable\": true\n+        },\n+        {\n+          \"resource\": \"site?institution=<%= institution_id %>\",\n+          \"action\": \"site:read\",\n+          \"delegable\": true\n+        },\n+        {\n+          \"resource\": \"device?institution=<%= institution_id %>\",\n+          \"action\": \"device:read\",\n+          \"delegable\": true\n+        },\n+        {\n+          \"resource\": \"testResult?institution=<%= institution_id %>\",\n+          \"action\": \"testResult:query\",","path":"app/policies/roles/institution/institution.json.erb","position":58,"original_position":58,"commit_id":"1ffd487020abe665a354fc7333b981d9cf5ba1af","original_commit_id":"1ffd487020abe665a354fc7333b981d9cf5ba1af","user":{"login":"spalladino","id":429604,"avatar_url":"https://avatars.githubusercontent.com/u/429604?v=3","gravatar_id":"","url":"https://api.github.com/users/spalladino","html_url":"https://github.com/spalladino","followers_url":"https://api.github.com/users/spalladino/followers","following_url":"https://api.github.com/users/spalladino/following{/other_user}","gists_url":"https://api.github.com/users/spalladino/gists{/gist_id}","starred_url":"https://api.github.com/users/spalladino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalladino/subscriptions","organizations_url":"https://api.github.com/users/spalladino/orgs","repos_url":"https://api.github.com/users/spalladino/repos","events_url":"https://api.github.com/users/spalladino/events{/privacy}","received_events_url":"https://api.github.com/users/spalladino/received_events","type":"User","site_admin":false},"body":"No access to medical dashboard for institution readers? ","created_at":"2015-12-22T15:28:51Z","updated_at":"2015-12-22T15:28:51Z","html_url":"https://github.com/instedd/cdx/pull/657#discussion_r48263516","pull_request_url":"https://api.github.com/repos/instedd/cdx/pulls/657","_links":{"self":{"href":"https://api.github.com/repos/instedd/cdx/pulls/comments/48263516"},"html":{"href":"https://github.com/instedd/cdx/pull/657#discussion_r48263516"},"pull_request":{"href":"https://api.github.com/repos/instedd/cdx/pulls/657"}}},"pull_request":{"url":"https://api.github.com/repos/instedd/cdx/pulls/657","id":54324053,"html_url":"https://github.com/instedd/cdx/pull/657","diff_url":"https://github.com/instedd/cdx/pull/657.diff","patch_url":"https://github.com/instedd/cdx/pull/657.patch","issue_url":"https://api.github.com/repos/instedd/cdx/issues/657","number":657,"state":"open","locked":false,"title":"631. Default roles are properly defined.","user":{"login":"nekron","id":957103,"avatar_url":"https://avatars.githubusercontent.com/u/957103?v=3","gravatar_id":"","url":"https://api.github.com/users/nekron","html_url":"https://github.com/nekron","followers_url":"https://api.github.com/users/nekron/followers","following_url":"https://api.github.com/users/nekron/following{/other_user}","gists_url":"https://api.github.com/users/nekron/gists{/gist_id}","starred_url":"https://api.github.com/users/nekron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nekron/subscriptions","organizations_url":"https://api.github.com/users/nekron/orgs","repos_url":"https://api.github.com/users/nekron/repos","events_url":"https://api.github.com/users/nekron/events{/privacy}","received_events_url":"https://api.github.com/users/nekron/received_events","type":"User","site_admin":false},"body":"Fixes 631","created_at":"2015-12-22T01:43:24Z","updated_at":"2015-12-22T15:28:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae32ecf55e7a2c001ba08828b5f382a2e92dc5e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/instedd/cdx/pulls/657/commits","review_comments_url":"https://api.github.com/repos/instedd/cdx/pulls/657/comments","review_comment_url":"https://api.github.com/repos/instedd/cdx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/instedd/cdx/issues/657/comments","statuses_url":"https://api.github.com/repos/instedd/cdx/statuses/1ffd487020abe665a354fc7333b981d9cf5ba1af","head":{"label":"instedd:feature/631-default-roles","ref":"feature/631-default-roles","sha":"1ffd487020abe665a354fc7333b981d9cf5ba1af","user":{"login":"instedd","id":1354872,"avatar_url":"https://avatars.githubusercontent.com/u/1354872?v=3","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"repo":{"id":23591416,"name":"cdx","full_name":"instedd/cdx","owner":{"login":"instedd","id":1354872,"avatar_url":"https://avatars.githubusercontent.com/u/1354872?v=3","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/instedd/cdx","description":"Connected Diagnostics Platform","fork":false,"url":"https://api.github.com/repos/instedd/cdx","forks_url":"https://api.github.com/repos/instedd/cdx/forks","keys_url":"https://api.github.com/repos/instedd/cdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instedd/cdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instedd/cdx/teams","hooks_url":"https://api.github.com/repos/instedd/cdx/hooks","issue_events_url":"https://api.github.com/repos/instedd/cdx/issues/events{/number}","events_url":"https://api.github.com/repos/instedd/cdx/events","assignees_url":"https://api.github.com/repos/instedd/cdx/assignees{/user}","branches_url":"https://api.github.com/repos/instedd/cdx/branches{/branch}","tags_url":"https://api.github.com/repos/instedd/cdx/tags","blobs_url":"https://api.github.com/repos/instedd/cdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instedd/cdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instedd/cdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/instedd/cdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instedd/cdx/statuses/{sha}","languages_url":"https://api.github.com/repos/instedd/cdx/languages","stargazers_url":"https://api.github.com/repos/instedd/cdx/stargazers","contributors_url":"https://api.github.com/repos/instedd/cdx/contributors","subscribers_url":"https://api.github.com/repos/instedd/cdx/subscribers","subscription_url":"https://api.github.com/repos/instedd/cdx/subscription","commits_url":"https://api.github.com/repos/instedd/cdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/instedd/cdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/instedd/cdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/instedd/cdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/instedd/cdx/contents/{+path}","compare_url":"https://api.github.com/repos/instedd/cdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instedd/cdx/merges","archive_url":"https://api.github.com/repos/instedd/cdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instedd/cdx/downloads","issues_url":"https://api.github.com/repos/instedd/cdx/issues{/number}","pulls_url":"https://api.github.com/repos/instedd/cdx/pulls{/number}","milestones_url":"https://api.github.com/repos/instedd/cdx/milestones{/number}","notifications_url":"https://api.github.com/repos/instedd/cdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instedd/cdx/labels{/name}","releases_url":"https://api.github.com/repos/instedd/cdx/releases{/id}","created_at":"2014-09-02T18:58:14Z","updated_at":"2015-10-29T17:46:54Z","pushed_at":"2015-12-22T14:56:56Z","git_url":"git://github.com/instedd/cdx.git","ssh_url":"git@github.com:instedd/cdx.git","clone_url":"https://github.com/instedd/cdx.git","svn_url":"https://github.com/instedd/cdx","homepage":null,"size":4253,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":195,"forks":4,"open_issues":195,"watchers":4,"default_branch":"master"}},"base":{"label":"instedd:master","ref":"master","sha":"b2af595c66987dedf923f89d8ad911926c32a984","user":{"login":"instedd","id":1354872,"avatar_url":"https://avatars.githubusercontent.com/u/1354872?v=3","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"repo":{"id":23591416,"name":"cdx","full_name":"instedd/cdx","owner":{"login":"instedd","id":1354872,"avatar_url":"https://avatars.githubusercontent.com/u/1354872?v=3","gravatar_id":"","url":"https://api.github.com/users/instedd","html_url":"https://github.com/instedd","followers_url":"https://api.github.com/users/instedd/followers","following_url":"https://api.github.com/users/instedd/following{/other_user}","gists_url":"https://api.github.com/users/instedd/gists{/gist_id}","starred_url":"https://api.github.com/users/instedd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instedd/subscriptions","organizations_url":"https://api.github.com/users/instedd/orgs","repos_url":"https://api.github.com/users/instedd/repos","events_url":"https://api.github.com/users/instedd/events{/privacy}","received_events_url":"https://api.github.com/users/instedd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/instedd/cdx","description":"Connected Diagnostics Platform","fork":false,"url":"https://api.github.com/repos/instedd/cdx","forks_url":"https://api.github.com/repos/instedd/cdx/forks","keys_url":"https://api.github.com/repos/instedd/cdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instedd/cdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instedd/cdx/teams","hooks_url":"https://api.github.com/repos/instedd/cdx/hooks","issue_events_url":"https://api.github.com/repos/instedd/cdx/issues/events{/number}","events_url":"https://api.github.com/repos/instedd/cdx/events","assignees_url":"https://api.github.com/repos/instedd/cdx/assignees{/user}","branches_url":"https://api.github.com/repos/instedd/cdx/branches{/branch}","tags_url":"https://api.github.com/repos/instedd/cdx/tags","blobs_url":"https://api.github.com/repos/instedd/cdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instedd/cdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instedd/cdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/instedd/cdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instedd/cdx/statuses/{sha}","languages_url":"https://api.github.com/repos/instedd/cdx/languages","stargazers_url":"https://api.github.com/repos/instedd/cdx/stargazers","contributors_url":"https://api.github.com/repos/instedd/cdx/contributors","subscribers_url":"https://api.github.com/repos/instedd/cdx/subscribers","subscription_url":"https://api.github.com/repos/instedd/cdx/subscription","commits_url":"https://api.github.com/repos/instedd/cdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/instedd/cdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/instedd/cdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/instedd/cdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/instedd/cdx/contents/{+path}","compare_url":"https://api.github.com/repos/instedd/cdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instedd/cdx/merges","archive_url":"https://api.github.com/repos/instedd/cdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instedd/cdx/downloads","issues_url":"https://api.github.com/repos/instedd/cdx/issues{/number}","pulls_url":"https://api.github.com/repos/instedd/cdx/pulls{/number}","milestones_url":"https://api.github.com/repos/instedd/cdx/milestones{/number}","notifications_url":"https://api.github.com/repos/instedd/cdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instedd/cdx/labels{/name}","releases_url":"https://api.github.com/repos/instedd/cdx/releases{/id}","created_at":"2014-09-02T18:58:14Z","updated_at":"2015-10-29T17:46:54Z","pushed_at":"2015-12-22T14:56:56Z","git_url":"git://github.com/instedd/cdx.git","ssh_url":"git@github.com:instedd/cdx.git","clone_url":"https://github.com/instedd/cdx.git","svn_url":"https://github.com/instedd/cdx","homepage":null,"size":4253,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":195,"forks":4,"open_issues":195,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/instedd/cdx/pulls/657"},"html":{"href":"https://github.com/instedd/cdx/pull/657"},"issue":{"href":"https://api.github.com/repos/instedd/cdx/issues/657"},"comments":{"href":"https://api.github.com/repos/instedd/cdx/issues/657/comments"},"review_comments":{"href":"https://api.github.com/repos/instedd/cdx/pulls/657/comments"},"review_comment":{"href":"https://api.github.com/repos/instedd/cdx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/instedd/cdx/pulls/657/commits"},"statuses":{"href":"https://api.github.com/repos/instedd/cdx/statuses/1ffd487020abe665a354fc7333b981d9cf5ba1af"}}}}