{"action":"created","comment":{"url":"https://api.github.com/repos/socrata/cetera/pulls/comments/65462997","id":65462997,"diff_hunk":"@@ -0,0 +1,93 @@\n+package com.socrata.cetera.services\n+\n+import scala.util.control.NonFatal\n+\n+import com.socrata.http.server._\n+import com.socrata.http.server.implicits._\n+import com.socrata.http.server.responses._\n+import com.socrata.http.server.routing.SimpleResource\n+import org.slf4j.LoggerFactory\n+\n+import com.socrata.cetera._\n+import com.socrata.cetera.authentication.{CoreClient, User => AuthUser}\n+import com.socrata.cetera.search.{DomainNotFound, UserClient}\n+import com.socrata.cetera.types.User\n+import com.socrata.cetera.util.JsonResponses._\n+import com.socrata.cetera.util.{InternalTimings, SearchResults, Timings, _}\n+\n+class UserSearchService(userClient: UserClient, coreClient: CoreClient) {\n+  lazy val logger = LoggerFactory.getLogger(getClass)\n+\n+  // Hi, my name is Werner Brandis. My voice is my passport, verify.\n+  def verifyUserAuthorization(cookie: Option[String],\n+                              extendedHost: Option[String],","path":"cetera-http/src/main/scala/com/socrata/cetera/services/UserSearchService.scala","position":23,"original_position":23,"commit_id":"26a279be1a83fe665083dd8c4069cc034b0355f2","original_commit_id":"26a279be1a83fe665083dd8c4069cc034b0355f2","user":{"login":"jasonij","id":272820,"avatar_url":"https://avatars.githubusercontent.com/u/272820?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonij","html_url":"https://github.com/jasonij","followers_url":"https://api.github.com/users/jasonij/followers","following_url":"https://api.github.com/users/jasonij/following{/other_user}","gists_url":"https://api.github.com/users/jasonij/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonij/subscriptions","organizations_url":"https://api.github.com/users/jasonij/orgs","repos_url":"https://api.github.com/users/jasonij/repos","events_url":"https://api.github.com/users/jasonij/events{/privacy}","received_events_url":"https://api.github.com/users/jasonij/received_events","type":"User","site_admin":false},"body":"FWIW, I see we used extendedHost elsewhere but it wasn't clear to me that this was basically search_context or the domain on which the user is authenticated.","created_at":"2016-06-01T23:46:10Z","updated_at":"2016-06-01T23:46:10Z","html_url":"https://github.com/socrata/cetera/pull/158#discussion_r65462997","pull_request_url":"https://api.github.com/repos/socrata/cetera/pulls/158","_links":{"self":{"href":"https://api.github.com/repos/socrata/cetera/pulls/comments/65462997"},"html":{"href":"https://github.com/socrata/cetera/pull/158#discussion_r65462997"},"pull_request":{"href":"https://api.github.com/repos/socrata/cetera/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/socrata/cetera/pulls/158","id":72103646,"html_url":"https://github.com/socrata/cetera/pull/158","diff_url":"https://github.com/socrata/cetera/pull/158.diff","patch_url":"https://github.com/socrata/cetera/pull/158.patch","issue_url":"https://api.github.com/repos/socrata/cetera/issues/158","number":158,"state":"open","locked":false,"title":"EN-6279 users","user":{"login":"sokrahta","id":9438863,"avatar_url":"https://avatars.githubusercontent.com/u/9438863?v=3","gravatar_id":"","url":"https://api.github.com/users/sokrahta","html_url":"https://github.com/sokrahta","followers_url":"https://api.github.com/users/sokrahta/followers","following_url":"https://api.github.com/users/sokrahta/following{/other_user}","gists_url":"https://api.github.com/users/sokrahta/gists{/gist_id}","starred_url":"https://api.github.com/users/sokrahta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokrahta/subscriptions","organizations_url":"https://api.github.com/users/sokrahta/orgs","repos_url":"https://api.github.com/users/sokrahta/repos","events_url":"https://api.github.com/users/sokrahta/events{/privacy}","received_events_url":"https://api.github.com/users/sokrahta/received_events","type":"User","site_admin":false},"body":"**what it do**\r\n* add another User type, backed by elasticsearch documents of type user\r\n* search for users by screen name and email address\r\n* requires authentication and admin or superadmin authorization\r\n\r\n**dependencies forward and back**\r\n* tour-bus mapping changes in https://github.com/socrata/tour-bus/pull/12\r\n* rammy mapping changes in https://github.com/socrata/rammstein/pull/115\r\n* frontend changes forthcoming\r\n\r\n**notably missing from these legs**\r\n* not replacing the core+metadb calls that return domain users with roles\r\n* not replacing the bit that shows users with pending invitations not yet accepted\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/socrata/cetera/158)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-05-31T23:48:58Z","updated_at":"2016-06-01T23:46:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b660b464d099f089bbeb8988f4a22d1a117a6b8d","assignee":{"login":"jasonij","id":272820,"avatar_url":"https://avatars.githubusercontent.com/u/272820?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonij","html_url":"https://github.com/jasonij","followers_url":"https://api.github.com/users/jasonij/followers","following_url":"https://api.github.com/users/jasonij/following{/other_user}","gists_url":"https://api.github.com/users/jasonij/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonij/subscriptions","organizations_url":"https://api.github.com/users/jasonij/orgs","repos_url":"https://api.github.com/users/jasonij/repos","events_url":"https://api.github.com/users/jasonij/events{/privacy}","received_events_url":"https://api.github.com/users/jasonij/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/socrata/cetera/pulls/158/commits","review_comments_url":"https://api.github.com/repos/socrata/cetera/pulls/158/comments","review_comment_url":"https://api.github.com/repos/socrata/cetera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socrata/cetera/issues/158/comments","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/26a279be1a83fe665083dd8c4069cc034b0355f2","head":{"label":"socrata:krah/EN-6279/users","ref":"krah/EN-6279/users","sha":"26a279be1a83fe665083dd8c4069cc034b0355f2","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":29320951,"name":"cetera","full_name":"socrata/cetera","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/cetera","description":"Cetera -- the golden-throated search service. Basically a wrapper around elasticsearch to enable keyword search to return dataset metadata for use by the front end in displaying search results.","fork":false,"url":"https://api.github.com/repos/socrata/cetera","forks_url":"https://api.github.com/repos/socrata/cetera/forks","keys_url":"https://api.github.com/repos/socrata/cetera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/cetera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/cetera/teams","hooks_url":"https://api.github.com/repos/socrata/cetera/hooks","issue_events_url":"https://api.github.com/repos/socrata/cetera/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/cetera/events","assignees_url":"https://api.github.com/repos/socrata/cetera/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/cetera/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/cetera/tags","blobs_url":"https://api.github.com/repos/socrata/cetera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/cetera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/cetera/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/cetera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/cetera/languages","stargazers_url":"https://api.github.com/repos/socrata/cetera/stargazers","contributors_url":"https://api.github.com/repos/socrata/cetera/contributors","subscribers_url":"https://api.github.com/repos/socrata/cetera/subscribers","subscription_url":"https://api.github.com/repos/socrata/cetera/subscription","commits_url":"https://api.github.com/repos/socrata/cetera/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/cetera/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/cetera/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/cetera/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/cetera/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/cetera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/cetera/merges","archive_url":"https://api.github.com/repos/socrata/cetera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/cetera/downloads","issues_url":"https://api.github.com/repos/socrata/cetera/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/cetera/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/cetera/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/cetera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/cetera/labels{/name}","releases_url":"https://api.github.com/repos/socrata/cetera/releases{/id}","deployments_url":"https://api.github.com/repos/socrata/cetera/deployments","created_at":"2015-01-15T22:15:58Z","updated_at":"2016-01-14T23:15:44Z","pushed_at":"2016-06-01T18:35:25Z","git_url":"git://github.com/socrata/cetera.git","ssh_url":"git@github.com:socrata/cetera.git","clone_url":"https://github.com/socrata/cetera.git","svn_url":"https://github.com/socrata/cetera","homepage":"","size":1007,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":6,"default_branch":"master"}},"base":{"label":"socrata:master","ref":"master","sha":"573c65ec9d60a1f9fe46b47a6f0d4a3862c2d279","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":29320951,"name":"cetera","full_name":"socrata/cetera","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/cetera","description":"Cetera -- the golden-throated search service. Basically a wrapper around elasticsearch to enable keyword search to return dataset metadata for use by the front end in displaying search results.","fork":false,"url":"https://api.github.com/repos/socrata/cetera","forks_url":"https://api.github.com/repos/socrata/cetera/forks","keys_url":"https://api.github.com/repos/socrata/cetera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/cetera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/cetera/teams","hooks_url":"https://api.github.com/repos/socrata/cetera/hooks","issue_events_url":"https://api.github.com/repos/socrata/cetera/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/cetera/events","assignees_url":"https://api.github.com/repos/socrata/cetera/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/cetera/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/cetera/tags","blobs_url":"https://api.github.com/repos/socrata/cetera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/cetera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/cetera/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/cetera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/cetera/languages","stargazers_url":"https://api.github.com/repos/socrata/cetera/stargazers","contributors_url":"https://api.github.com/repos/socrata/cetera/contributors","subscribers_url":"https://api.github.com/repos/socrata/cetera/subscribers","subscription_url":"https://api.github.com/repos/socrata/cetera/subscription","commits_url":"https://api.github.com/repos/socrata/cetera/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/cetera/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/cetera/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/cetera/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/cetera/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/cetera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/cetera/merges","archive_url":"https://api.github.com/repos/socrata/cetera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/cetera/downloads","issues_url":"https://api.github.com/repos/socrata/cetera/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/cetera/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/cetera/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/cetera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/cetera/labels{/name}","releases_url":"https://api.github.com/repos/socrata/cetera/releases{/id}","deployments_url":"https://api.github.com/repos/socrata/cetera/deployments","created_at":"2015-01-15T22:15:58Z","updated_at":"2016-01-14T23:15:44Z","pushed_at":"2016-06-01T18:35:25Z","git_url":"git://github.com/socrata/cetera.git","ssh_url":"git@github.com:socrata/cetera.git","clone_url":"https://github.com/socrata/cetera.git","svn_url":"https://github.com/socrata/cetera","homepage":"","size":1007,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socrata/cetera/pulls/158"},"html":{"href":"https://github.com/socrata/cetera/pull/158"},"issue":{"href":"https://api.github.com/repos/socrata/cetera/issues/158"},"comments":{"href":"https://api.github.com/repos/socrata/cetera/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/socrata/cetera/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/socrata/cetera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socrata/cetera/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/socrata/cetera/statuses/26a279be1a83fe665083dd8c4069cc034b0355f2"}}}}
{"actor":{"display_login":"jasonij"}}