{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/115274064","pull_request_review_id":36800298,"id":115274064,"diff_hunk":"@@ -12,7 +12,13 @@\n PERCOLATE_DOC_TYPE = '.percolator'\n \n USER_DOC_TYPE = 'program_user'\n-DOC_TYPES = (USER_DOC_TYPE, )\n+PUBLIC_USER_DOC_TYPE = 'public_program_user'\n+VALIDATABLE_DOC_TYPES = (\n+    USER_DOC_TYPE,\n+    # need to run recreate_index once in each env first, otherwise this will fail\n+    # uncomment in the next release\n+    # PUBLIC_USER_DOC_TYPE,","path":"search/connection.py","position":10,"original_position":10,"commit_id":"a4b9e8b9774f0506ae6ce2fe6f854cdbfcf2d8fd","original_commit_id":"a4b9e8b9774f0506ae6ce2fe6f854cdbfcf2d8fd","user":{"login":"rhysyngsun","id":28598,"avatar_url":"https://avatars0.githubusercontent.com/u/28598?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysyngsun","html_url":"https://github.com/rhysyngsun","followers_url":"https://api.github.com/users/rhysyngsun/followers","following_url":"https://api.github.com/users/rhysyngsun/following{/other_user}","gists_url":"https://api.github.com/users/rhysyngsun/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysyngsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysyngsun/subscriptions","organizations_url":"https://api.github.com/users/rhysyngsun/orgs","repos_url":"https://api.github.com/users/rhysyngsun/repos","events_url":"https://api.github.com/users/rhysyngsun/events{/privacy}","received_events_url":"https://api.github.com/users/rhysyngsun/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2017-05-08T15:19:28Z","updated_at":"2017-05-08T15:19:28Z","html_url":"https://github.com/mitodl/micromasters/pull/2908#discussion_r115274064","pull_request_url":"https://api.github.com/repos/mitodl/micromasters/pulls/2908","_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments/115274064"},"html":{"href":"https://github.com/mitodl/micromasters/pull/2908#discussion_r115274064"},"pull_request":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/2908"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/2908","id":111351675,"html_url":"https://github.com/mitodl/micromasters/pull/2908","diff_url":"https://github.com/mitodl/micromasters/pull/2908.diff","patch_url":"https://github.com/mitodl/micromasters/pull/2908.patch","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/2908","number":2908,"state":"open","locked":false,"title":"Added learner-learner search page (#2690)","user":{"login":"rhysyngsun","id":28598,"avatar_url":"https://avatars0.githubusercontent.com/u/28598?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysyngsun","html_url":"https://github.com/rhysyngsun","followers_url":"https://api.github.com/users/rhysyngsun/followers","following_url":"https://api.github.com/users/rhysyngsun/following{/other_user}","gists_url":"https://api.github.com/users/rhysyngsun/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysyngsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysyngsun/subscriptions","organizations_url":"https://api.github.com/users/rhysyngsun/orgs","repos_url":"https://api.github.com/users/rhysyngsun/repos","events_url":"https://api.github.com/users/rhysyngsun/events{/privacy}","received_events_url":"https://api.github.com/users/rhysyngsun/received_events","type":"User","site_admin":false},"body":"#### What are the relevant tickets?\r\nFixes #2512 \r\n\r\n#### What's this PR do?\r\nAdds a learner to learner search page.\r\n\r\n#### How should this be manually tested?\r\n\r\nYou'll need to run `./manage.py recreate_index`.\r\n\r\n- Staff search should work as it always has.\r\n- Learners should be able to search only on name and filter only on location, course, and semester.\r\n\r\n#### Where should the reviewer start?\r\n(Optional)\r\n\r\n#### Any background context you want to provide?\r\nOne of my main concerns around this work was ensuring we don't expose any sensitive profile data. The was accomplished by doing the following:\r\n\r\n- Added a new doctype that only indexes and stores non-sensitive profile information. Learner-learner search filters to this doctype. This prevents the possibility of inferring private information through filtering or aggregates and generally ensures that sensitive data doesn't end up in `_source`.\r\n- Added enforcement of filtering to non-privat eprofiles for the learner-learner search query.\r\n- Added enforcement of `_source` filtering on the learner-learner search query in case anything ever slipped through in the future.\r\n\r\n#### Screenshots (if appropriate)\r\n![selection_046](https://cloud.githubusercontent.com/assets/28598/24269361/51660e82-0fe7-11e7-8424-c5434881b44c.png)\r\n\r\n\r\n#### What GIF best describes this PR or how it makes you feel?\r\n![](http://media1.giphy.com/media/j3F9SdJo4lIsM/200w.gif)\r\n","created_at":"2017-03-17T19:37:20Z","updated_at":"2017-05-08T15:19:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a256f1d3d4112f3b36abb3ef3194a3257e6da82c","assignee":{"login":"noisecapella","id":863262,"avatar_url":"https://avatars1.githubusercontent.com/u/863262?v=3","gravatar_id":"","url":"https://api.github.com/users/noisecapella","html_url":"https://github.com/noisecapella","followers_url":"https://api.github.com/users/noisecapella/followers","following_url":"https://api.github.com/users/noisecapella/following{/other_user}","gists_url":"https://api.github.com/users/noisecapella/gists{/gist_id}","starred_url":"https://api.github.com/users/noisecapella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisecapella/subscriptions","organizations_url":"https://api.github.com/users/noisecapella/orgs","repos_url":"https://api.github.com/users/noisecapella/repos","events_url":"https://api.github.com/users/noisecapella/events{/privacy}","received_events_url":"https://api.github.com/users/noisecapella/received_events","type":"User","site_admin":false},"assignees":[{"login":"noisecapella","id":863262,"avatar_url":"https://avatars1.githubusercontent.com/u/863262?v=3","gravatar_id":"","url":"https://api.github.com/users/noisecapella","html_url":"https://github.com/noisecapella","followers_url":"https://api.github.com/users/noisecapella/followers","following_url":"https://api.github.com/users/noisecapella/following{/other_user}","gists_url":"https://api.github.com/users/noisecapella/gists{/gist_id}","starred_url":"https://api.github.com/users/noisecapella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisecapella/subscriptions","organizations_url":"https://api.github.com/users/noisecapella/orgs","repos_url":"https://api.github.com/users/noisecapella/repos","events_url":"https://api.github.com/users/noisecapella/events{/privacy}","received_events_url":"https://api.github.com/users/noisecapella/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/micromasters/pulls/2908/commits","review_comments_url":"https://api.github.com/repos/mitodl/micromasters/pulls/2908/comments","review_comment_url":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/2908/comments","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/a4b9e8b9774f0506ae6ce2fe6f854cdbfcf2d8fd","head":{"label":"mitodl:nl/2690-learner-learner-search","ref":"nl/2690-learner-learner-search","sha":"a4b9e8b9774f0506ae6ce2fe6f854cdbfcf2d8fd","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars1.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars1.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2017-03-31T21:49:51Z","pushed_at":"2017-05-08T15:08:14Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":30982,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":283,"forks":4,"open_issues":283,"watchers":9,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"0cf751d61fc176f10257bb9a2fee399f1d28250f","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars1.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":52919185,"name":"micromasters","full_name":"mitodl/micromasters","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars1.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/micromasters","description":"Portal for learners and course teams to access MITx micromasters programs: https://goo.gl/tsUTSO","fork":false,"url":"https://api.github.com/repos/mitodl/micromasters","forks_url":"https://api.github.com/repos/mitodl/micromasters/forks","keys_url":"https://api.github.com/repos/mitodl/micromasters/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/micromasters/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/micromasters/teams","hooks_url":"https://api.github.com/repos/mitodl/micromasters/hooks","issue_events_url":"https://api.github.com/repos/mitodl/micromasters/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/micromasters/events","assignees_url":"https://api.github.com/repos/mitodl/micromasters/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/micromasters/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/micromasters/tags","blobs_url":"https://api.github.com/repos/mitodl/micromasters/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/micromasters/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/micromasters/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/micromasters/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/micromasters/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/micromasters/languages","stargazers_url":"https://api.github.com/repos/mitodl/micromasters/stargazers","contributors_url":"https://api.github.com/repos/mitodl/micromasters/contributors","subscribers_url":"https://api.github.com/repos/mitodl/micromasters/subscribers","subscription_url":"https://api.github.com/repos/mitodl/micromasters/subscription","commits_url":"https://api.github.com/repos/mitodl/micromasters/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/micromasters/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/micromasters/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/micromasters/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/micromasters/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/micromasters/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/micromasters/merges","archive_url":"https://api.github.com/repos/mitodl/micromasters/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/micromasters/downloads","issues_url":"https://api.github.com/repos/mitodl/micromasters/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/micromasters/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/micromasters/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/micromasters/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/micromasters/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/micromasters/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/micromasters/deployments","created_at":"2016-03-01T23:53:17Z","updated_at":"2017-03-31T21:49:51Z","pushed_at":"2017-05-08T15:08:14Z","git_url":"git://github.com/mitodl/micromasters.git","ssh_url":"git@github.com:mitodl/micromasters.git","clone_url":"https://github.com/mitodl/micromasters.git","svn_url":"https://github.com/mitodl/micromasters","homepage":"","size":30982,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":283,"forks":4,"open_issues":283,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/2908"},"html":{"href":"https://github.com/mitodl/micromasters/pull/2908"},"issue":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/2908"},"comments":{"href":"https://api.github.com/repos/mitodl/micromasters/issues/2908/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/2908/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/micromasters/pulls/2908/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/micromasters/statuses/a4b9e8b9774f0506ae6ce2fe6f854cdbfcf2d8fd"}}}}
{"actor":{"display_login":"rhysyngsun"}}