{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments/88323767","pull_request_review_id":8901175,"id":88323767,"diff_hunk":"@@ -435,10 +440,16 @@ class WorkspaceService(protected val userInfo: UserInfo, val dataSource: SlickDa\n     dataSource.inTransaction { dataAccess =>\n       withWorkspaceContext(workspaceName, dataAccess) { workspaceContext =>\n         requireOwnerIgnoreLock(workspaceContext.workspace, dataAccess) {\n-          dataAccess.workspaceQuery.listEmailsAndAccessLevel(workspaceContext).map { emailsAndAccess =>\n-            // toMap below will drop duplicate keys, keeping the last entry only\n-            // sort by access level to make sure higher access levels remain in the resulting map\n-            RequestComplete(StatusCodes.OK, emailsAndAccess.sortBy { case (_, accessLevel) => accessLevel }.toMap)\n+          dataAccess.workspaceQuery.listEmailsAndAccessLevel(workspaceContext).flatMap { emailsAndAccess =>\n+            dataAccess.workspaceQuery.getInvites(workspaceContext.workspaceId).map { invites =>\n+              // toMap below will drop duplicate keys, keeping the last entry only\n+              // sort by access level to make sure higher access levels remain in the resulting map\n+              RequestComplete(\n+                StatusCodes.OK,\n+                WorkspaceACL(emailsAndAccess.sortBy { case (_, accessLevel) => accessLevel }.toMap,\n+                invites.sortBy { case (_, accessLevel) => accessLevel }.toMap)","path":"src/main/scala/org/broadinstitute/dsde/rawls/workspace/WorkspaceService.scala","position":41,"original_position":41,"commit_id":"f0f543adaec6ec5817a610b561bb9aa802b70a38","original_commit_id":"f0f543adaec6ec5817a610b561bb9aa802b70a38","user":{"login":"MatthewBemis","id":7257391,"avatar_url":"https://avatars.githubusercontent.com/u/7257391?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewBemis","html_url":"https://github.com/MatthewBemis","followers_url":"https://api.github.com/users/MatthewBemis/followers","following_url":"https://api.github.com/users/MatthewBemis/following{/other_user}","gists_url":"https://api.github.com/users/MatthewBemis/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewBemis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewBemis/subscriptions","organizations_url":"https://api.github.com/users/MatthewBemis/orgs","repos_url":"https://api.github.com/users/MatthewBemis/repos","events_url":"https://api.github.com/users/MatthewBemis/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewBemis/received_events","type":"User","site_admin":false},"body":"this response now looks like:\r\n\r\n```\r\n{\r\n  \"granted\": {\r\n    \"realuser1@gmail.com\": \"WRITER\",\r\n    \"realuser2@gmail.com\": \"READER\",\r\n    \"realuser3gmail.com\": \"OWNER\",\r\n    \"realuser4@gmail.com\": \"READER\",\r\n    \"realuser5@gmail.com\": \"OWNER\",\r\n    \"GROUP_PROJECT_broad-dsde-dev-Owner@dev.test.firecloud.org\": \"PROJECT_OWNER\"\r\n  },\r\n  \"pending\": {\r\n    \"fake-user-foo@example.com\": \"WRITER\",\r\n    \"fake-user@example.com\": \"OWNER\"\r\n  }\r\n}\r\n```","created_at":"2016-11-16T20:27:19Z","updated_at":"2016-11-16T20:27:19Z","html_url":"https://github.com/broadinstitute/rawls/pull/572#discussion_r88323767","pull_request_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/572","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments/88323767"},"html":{"href":"https://github.com/broadinstitute/rawls/pull/572#discussion_r88323767"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/572"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/rawls/pulls/572","id":94043100,"html_url":"https://github.com/broadinstitute/rawls/pull/572","diff_url":"https://github.com/broadinstitute/rawls/pull/572.diff","patch_url":"https://github.com/broadinstitute/rawls/pull/572.patch","issue_url":"https://api.github.com/repos/broadinstitute/rawls/issues/572","number":572,"state":"open","locked":false,"title":"GAWB-1274: Implement pending workspace access w/ endpoints","user":{"login":"MatthewBemis","id":7257391,"avatar_url":"https://avatars.githubusercontent.com/u/7257391?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewBemis","html_url":"https://github.com/MatthewBemis","followers_url":"https://api.github.com/users/MatthewBemis/followers","following_url":"https://api.github.com/users/MatthewBemis/following{/other_user}","gists_url":"https://api.github.com/users/MatthewBemis/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewBemis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewBemis/subscriptions","organizations_url":"https://api.github.com/users/MatthewBemis/orgs","repos_url":"https://api.github.com/users/MatthewBemis/repos","events_url":"https://api.github.com/users/MatthewBemis/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewBemis/received_events","type":"User","site_admin":false},"body":"- [ ] **Submitter**: Include the JIRA issue number in the PR description\r\n- [ ] **Submitter**: Make sure Swagger is updated if API changes\r\n- [ ] **Submitter**: If updating admin endpoints, also update [firecloud-admin-cli](https://github.com/broadinstitute/firecloud-admin-cli)\r\n- [ ] **Submitter**: Check documentation and code comments. Add explanatory PR comments if helpful.\r\n- [ ] **Submitter**: JIRA ticket checks:\r\n  * Acceptance criteria exists and is met\r\n  * Note any changes to implementation from the description\r\n  * Add notes on what you've tested\r\n- [ ] **Submitter**: Update RC_XXX release ticket with any config or environment changes necessary\r\n- [ ] **Submitter**: Database checks:\r\n  * If PR includes new or changed db queries, include the explain plans in the description\r\n  * Make sure liquibase is updated if appropriate\r\n  * If doing a migration, take a backup of the\r\n  [dev](https://console.cloud.google.com/sql/instances/terraform-qfarbdq3lrexxck5htofjs5z6m/backups?project=broad-dsde-dev&organizationId=548622027621)\r\n  and\r\n  [alpha](https://console.cloud.google.com/sql/instances/terraform-r4caezzc35c4tb7pgdhwkmme4y/backups?project=broad-dsde-alpha&organizationId=548622027621)\r\n  DBs in Google Cloud Console\r\n- [ ] **Submitter**: Update FISMA documentation if changes to:\r\n  * Authentication\r\n  * Authorization\r\n  * Encryption\r\n  * Audit trails\r\n- [ ] **Submitter**: If you're adding new libraries, sign us up to security updates for them\r\n- [ ] Tell your tech lead (TL) that the PR exists if they want to look at it\r\n- [ ] Anoint a lead reviewer (LR). **Assign PR to LR**\r\n* Review cycle:\r\n  * LR reviews\r\n  * Rest of team may comment on PR at will\r\n  * **LR assigns to submitter** for feedback fixes\r\n  * Submitter rebases to develop again if necessary\r\n  * Submitter makes further commits. DO NOT SQUASH\r\n  * Submitter updates documentation as needed\r\n  * Submitter **reassigns to LR** for further feedback\r\n- [ ] **TL** sign off\r\n- [ ] **LR** sign off\r\n- [ ] **Product Owner** sign off\r\n- [ ] **Assign to submitter** to finalize\r\n- [ ] **Submitter**: Verify all tests go green, including CI tests\r\n- [ ] **Submitter**: Squash commits and merge to develop\r\n- [ ] **Submitter**: Delete branch after merge\r\n- [ ] **Submitter**: **Test this change works on dev environment after deployment**. YOU own getting it fixed if dev isn't working for ANY reason!\r\n- [ ] **Submitter**: Verify swagger UI on dev environment still works after deployment\r\n- [ ] **Submitter**: Inform other teams of any API changes via hipchat and/or email\r\n- [ ] **Submitter**: Mark JIRA issue as resolved once this checklist is completed\r\n","created_at":"2016-11-16T20:25:57Z","updated_at":"2016-11-16T20:27:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d65995a08e88ca6f126c5095d5b9ba3ebc2d008","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/572/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/572/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/issues/572/comments","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/f0f543adaec6ec5817a610b561bb9aa802b70a38","head":{"label":"broadinstitute:mb_gawb1274","ref":"mb_gawb1274","sha":"f0f543adaec6ec5817a610b561bb9aa802b70a38","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34129770,"name":"rawls","full_name":"broadinstitute/rawls","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/rawls","description":"Rawls service for DSDE","fork":false,"url":"https://api.github.com/repos/broadinstitute/rawls","forks_url":"https://api.github.com/repos/broadinstitute/rawls/forks","keys_url":"https://api.github.com/repos/broadinstitute/rawls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/rawls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/rawls/teams","hooks_url":"https://api.github.com/repos/broadinstitute/rawls/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/rawls/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/rawls/events","assignees_url":"https://api.github.com/repos/broadinstitute/rawls/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/rawls/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/rawls/tags","blobs_url":"https://api.github.com/repos/broadinstitute/rawls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/rawls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/rawls/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/rawls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/rawls/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/rawls/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/rawls/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/rawls/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/rawls/subscription","commits_url":"https://api.github.com/repos/broadinstitute/rawls/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/rawls/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/rawls/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/rawls/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/rawls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/rawls/merges","archive_url":"https://api.github.com/repos/broadinstitute/rawls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/rawls/downloads","issues_url":"https://api.github.com/repos/broadinstitute/rawls/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/rawls/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/rawls/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/rawls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/rawls/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/rawls/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/rawls/deployments","created_at":"2015-04-17T17:16:07Z","updated_at":"2016-11-04T19:53:29Z","pushed_at":"2016-11-16T20:25:57Z","git_url":"git://github.com/broadinstitute/rawls.git","ssh_url":"git@github.com:broadinstitute/rawls.git","clone_url":"https://github.com/broadinstitute/rawls.git","svn_url":"https://github.com/broadinstitute/rawls","homepage":null,"size":5783,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"72a3b9174ff394802bff336317c7c4f5cd236942","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34129770,"name":"rawls","full_name":"broadinstitute/rawls","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/rawls","description":"Rawls service for DSDE","fork":false,"url":"https://api.github.com/repos/broadinstitute/rawls","forks_url":"https://api.github.com/repos/broadinstitute/rawls/forks","keys_url":"https://api.github.com/repos/broadinstitute/rawls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/rawls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/rawls/teams","hooks_url":"https://api.github.com/repos/broadinstitute/rawls/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/rawls/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/rawls/events","assignees_url":"https://api.github.com/repos/broadinstitute/rawls/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/rawls/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/rawls/tags","blobs_url":"https://api.github.com/repos/broadinstitute/rawls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/rawls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/rawls/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/rawls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/rawls/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/rawls/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/rawls/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/rawls/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/rawls/subscription","commits_url":"https://api.github.com/repos/broadinstitute/rawls/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/rawls/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/rawls/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/rawls/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/rawls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/rawls/merges","archive_url":"https://api.github.com/repos/broadinstitute/rawls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/rawls/downloads","issues_url":"https://api.github.com/repos/broadinstitute/rawls/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/rawls/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/rawls/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/rawls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/rawls/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/rawls/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/rawls/deployments","created_at":"2015-04-17T17:16:07Z","updated_at":"2016-11-04T19:53:29Z","pushed_at":"2016-11-16T20:25:57Z","git_url":"git://github.com/broadinstitute/rawls.git","ssh_url":"git@github.com:broadinstitute/rawls.git","clone_url":"https://github.com/broadinstitute/rawls.git","svn_url":"https://github.com/broadinstitute/rawls","homepage":null,"size":5783,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/572"},"html":{"href":"https://github.com/broadinstitute/rawls/pull/572"},"issue":{"href":"https://api.github.com/repos/broadinstitute/rawls/issues/572"},"comments":{"href":"https://api.github.com/repos/broadinstitute/rawls/issues/572/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/572/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/572/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/rawls/statuses/f0f543adaec6ec5817a610b561bb9aa802b70a38"}}}}
{"actor":{"display_login":"MatthewBemis"}}