{"action":"closed","number":860,"pull_request":{"url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860","id":35465026,"html_url":"https://github.com/couchbase/sync_gateway/pull/860","diff_url":"https://github.com/couchbase/sync_gateway/pull/860.diff","patch_url":"https://github.com/couchbase/sync_gateway/pull/860.patch","issue_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/860","number":860,"state":"closed","locked":false,"title":"Restore support for querying reduce views through the admin API","user":{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false},"body":"Fixes #857\r\n\r\nRestores the ability to query views with a reduce function when running queries that don't require channel filtering.  There are two scenarios where channel filtering isn't applied (and so reduce functions can be used):\r\n1. When running the query over the admin API.\r\n2. When the user running the query has access to the `*` channel\r\n\r\nIf a view with a reduce function is used in any other scenario, it returns no data and logs a warning in the Sync Gateway logs.","created_at":"2015-05-14T21:38:32Z","updated_at":"2015-05-14T22:31:05Z","closed_at":"2015-05-14T22:31:05Z","merged_at":null,"merge_commit_sha":"7c18fa09b00bdaa78e2ffbd28b00830963dcecf5","assignee":{"login":"adamcfraser","id":8866453,"avatar_url":"https://avatars.githubusercontent.com/u/8866453?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcfraser","html_url":"https://github.com/adamcfraser","followers_url":"https://api.github.com/users/adamcfraser/followers","following_url":"https://api.github.com/users/adamcfraser/following{/other_user}","gists_url":"https://api.github.com/users/adamcfraser/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcfraser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcfraser/subscriptions","organizations_url":"https://api.github.com/users/adamcfraser/orgs","repos_url":"https://api.github.com/users/adamcfraser/repos","events_url":"https://api.github.com/users/adamcfraser/events{/privacy}","received_events_url":"https://api.github.com/users/adamcfraser/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860/commits","review_comments_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860/comments","review_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/860/comments","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/b70d4bb2244cad97df60b948ae555271ef3cc82d","head":{"label":"couchbase:feature/issue_857","ref":"feature/issue_857","sha":"b70d4bb2244cad97df60b948ae555271ef3cc82d","user":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":6082996,"name":"sync_gateway","full_name":"couchbase/sync_gateway","owner":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbase/sync_gateway","description":"Connects Couchbase Lite to Couchbase Server","fork":false,"url":"https://api.github.com/repos/couchbase/sync_gateway","forks_url":"https://api.github.com/repos/couchbase/sync_gateway/forks","keys_url":"https://api.github.com/repos/couchbase/sync_gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/sync_gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/sync_gateway/teams","hooks_url":"https://api.github.com/repos/couchbase/sync_gateway/hooks","issue_events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/sync_gateway/events","assignees_url":"https://api.github.com/repos/couchbase/sync_gateway/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/sync_gateway/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/sync_gateway/tags","blobs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/sync_gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/sync_gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/sync_gateway/languages","stargazers_url":"https://api.github.com/repos/couchbase/sync_gateway/stargazers","contributors_url":"https://api.github.com/repos/couchbase/sync_gateway/contributors","subscribers_url":"https://api.github.com/repos/couchbase/sync_gateway/subscribers","subscription_url":"https://api.github.com/repos/couchbase/sync_gateway/subscription","commits_url":"https://api.github.com/repos/couchbase/sync_gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/sync_gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/sync_gateway/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/sync_gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/sync_gateway/merges","archive_url":"https://api.github.com/repos/couchbase/sync_gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/sync_gateway/downloads","issues_url":"https://api.github.com/repos/couchbase/sync_gateway/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/sync_gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/sync_gateway/releases{/id}","created_at":"2012-10-04T22:25:43Z","updated_at":"2015-05-14T00:59:28Z","pushed_at":"2015-05-14T22:10:48Z","git_url":"git://github.com/couchbase/sync_gateway.git","ssh_url":"git@github.com:couchbase/sync_gateway.git","clone_url":"https://github.com/couchbase/sync_gateway.git","svn_url":"https://github.com/couchbase/sync_gateway","homepage":"","size":16960,"stargazers_count":160,"watchers_count":160,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":166,"forks":57,"open_issues":166,"watchers":160,"default_branch":"master"}},"base":{"label":"couchbase:release/1.1.0","ref":"release/1.1.0","sha":"7d134ffb0ce024237d7ec6b40f455b076b725022","user":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":6082996,"name":"sync_gateway","full_name":"couchbase/sync_gateway","owner":{"login":"couchbase","id":605755,"avatar_url":"https://avatars.githubusercontent.com/u/605755?v=3","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/couchbase/sync_gateway","description":"Connects Couchbase Lite to Couchbase Server","fork":false,"url":"https://api.github.com/repos/couchbase/sync_gateway","forks_url":"https://api.github.com/repos/couchbase/sync_gateway/forks","keys_url":"https://api.github.com/repos/couchbase/sync_gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/sync_gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/sync_gateway/teams","hooks_url":"https://api.github.com/repos/couchbase/sync_gateway/hooks","issue_events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/sync_gateway/events","assignees_url":"https://api.github.com/repos/couchbase/sync_gateway/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/sync_gateway/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/sync_gateway/tags","blobs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/sync_gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/sync_gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/sync_gateway/languages","stargazers_url":"https://api.github.com/repos/couchbase/sync_gateway/stargazers","contributors_url":"https://api.github.com/repos/couchbase/sync_gateway/contributors","subscribers_url":"https://api.github.com/repos/couchbase/sync_gateway/subscribers","subscription_url":"https://api.github.com/repos/couchbase/sync_gateway/subscription","commits_url":"https://api.github.com/repos/couchbase/sync_gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/sync_gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/sync_gateway/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/sync_gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/sync_gateway/merges","archive_url":"https://api.github.com/repos/couchbase/sync_gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/sync_gateway/downloads","issues_url":"https://api.github.com/repos/couchbase/sync_gateway/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/sync_gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/sync_gateway/releases{/id}","created_at":"2012-10-04T22:25:43Z","updated_at":"2015-05-14T00:59:28Z","pushed_at":"2015-05-14T22:10:48Z","git_url":"git://github.com/couchbase/sync_gateway.git","ssh_url":"git@github.com:couchbase/sync_gateway.git","clone_url":"https://github.com/couchbase/sync_gateway.git","svn_url":"https://github.com/couchbase/sync_gateway","homepage":"","size":16960,"stargazers_count":160,"watchers_count":160,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":166,"forks":57,"open_issues":166,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860"},"html":{"href":"https://github.com/couchbase/sync_gateway/pull/860"},"issue":{"href":"https://api.github.com/repos/couchbase/sync_gateway/issues/860"},"comments":{"href":"https://api.github.com/repos/couchbase/sync_gateway/issues/860/comments"},"review_comments":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860/comments"},"review_comment":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/860/commits"},"statuses":{"href":"https://api.github.com/repos/couchbase/sync_gateway/statuses/b70d4bb2244cad97df60b948ae555271ef3cc82d"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":26,"deletions":5,"changed_files":1}}