{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/argo/pulls/comments/45286475","id":45286475,"diff_hunk":"@@ -72,51 +77,39 @@ def permitted_collections\n     result.sort! do |a, b|\n       a['dc_title_tesim'].to_s <=> b['dc_title_tesim'].to_s\n     end\n-    # puts 'qry '+result.first['dc_title_tesim'].encoding.inspect\n-    res = [['None', '']]\n-    res += result.collect do |doc|\n+\n+    [['None', '']] + result.collect do |doc|\n       [Array(doc['dc_title_tesim']).first + ' (' + doc['id'].to_s + ')', doc['id'].to_s]\n     end\n-    res\n   end\n \n   @groups_to_impersonate = nil\n-  # create a set of groups in a cookie store to allow a repository admin to see the repository as if they had a different set of permissions\n+  # Allow a repository admin to see the repository as if they had a different set of permissions\n+  # @param [Array<String>] set of groups\n   def set_groups_to_impersonate(grps)\n     @groups_to_impersonate = grps\n   end\n \n   def groups\n     return @groups_to_impersonate if @groups_to_impersonate\n-\n     perm_keys = [\"sunetid:#{login}\"]\n-    if webauth && webauth.privgroup.present?\n-      perm_keys += webauth.privgroup.split(/\\|/).collect { |g| \"workgroup:#{g}\" }\n-    end\n-\n-    perm_keys\n+    return perm_keys unless webauth && webauth.privgroup.present?\n+    perm_keys + webauth.privgroup.split(/\\|/).collect { |g| \"workgroup:#{g}\" }","path":"app/models/user.rb","position":102,"original_position":102,"commit_id":"e8ba0f36889d5cfe8704f6a9c1bd7bb4e63af885","original_commit_id":"e8ba0f36889d5cfe8704f6a9c1bd7bb4e63af885","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer `map` over `collect`.","created_at":"2015-11-19T01:06:09Z","updated_at":"2015-11-19T01:06:09Z","html_url":"https://github.com/sul-dlss/argo/pull/228#discussion_r45286475","pull_request_url":"https://api.github.com/repos/sul-dlss/argo/pulls/228","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/comments/45286475"},"html":{"href":"https://github.com/sul-dlss/argo/pull/228#discussion_r45286475"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/228"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/argo/pulls/228","id":51166730,"html_url":"https://github.com/sul-dlss/argo/pull/228","diff_url":"https://github.com/sul-dlss/argo/pull/228.diff","patch_url":"https://github.com/sul-dlss/argo/pull/228.patch","issue_url":"https://api.github.com/repos/sul-dlss/argo/issues/228","number":228,"state":"open","locked":false,"title":"APO tests","user":{"login":"atz","id":109954,"avatar_url":"https://avatars.githubusercontent.com/u/109954?v=3","gravatar_id":"","url":"https://api.github.com/users/atz","html_url":"https://github.com/atz","followers_url":"https://api.github.com/users/atz/followers","following_url":"https://api.github.com/users/atz/following{/other_user}","gists_url":"https://api.github.com/users/atz/gists{/gist_id}","starred_url":"https://api.github.com/users/atz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atz/subscriptions","organizations_url":"https://api.github.com/users/atz/orgs","repos_url":"https://api.github.com/users/atz/repos","events_url":"https://api.github.com/users/atz/events{/privacy}","received_events_url":"https://api.github.com/users/atz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-19T01:06:05Z","updated_at":"2015-11-19T01:06:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2dfdc6e5909afe507edc627397d2f2b12640df40","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/argo/pulls/228/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/argo/pulls/228/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/argo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/argo/issues/228/comments","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/e8ba0f36889d5cfe8704f6a9c1bd7bb4e63af885","head":{"label":"sul-dlss:apo_tests","ref":"apo_tests","sha":"e8ba0f36889d5cfe8704f6a9c1bd7bb4e63af885","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":4989164,"name":"argo","full_name":"sul-dlss/argo","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/argo","description":"The administrative discovery interface for Stanford's Digital Object Registry","fork":false,"url":"https://api.github.com/repos/sul-dlss/argo","forks_url":"https://api.github.com/repos/sul-dlss/argo/forks","keys_url":"https://api.github.com/repos/sul-dlss/argo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/argo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/argo/teams","hooks_url":"https://api.github.com/repos/sul-dlss/argo/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/argo/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/argo/events","assignees_url":"https://api.github.com/repos/sul-dlss/argo/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/argo/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/argo/tags","blobs_url":"https://api.github.com/repos/sul-dlss/argo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/argo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/argo/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/argo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/argo/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/argo/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/argo/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/argo/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/argo/subscription","commits_url":"https://api.github.com/repos/sul-dlss/argo/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/argo/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/argo/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/argo/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/argo/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/argo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/argo/merges","archive_url":"https://api.github.com/repos/sul-dlss/argo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/argo/downloads","issues_url":"https://api.github.com/repos/sul-dlss/argo/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/argo/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/argo/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/argo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/argo/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/argo/releases{/id}","created_at":"2012-07-11T13:15:05Z","updated_at":"2015-11-09T08:17:26Z","pushed_at":"2015-11-19T01:06:05Z","git_url":"git://github.com/sul-dlss/argo.git","ssh_url":"git@github.com:sul-dlss/argo.git","clone_url":"https://github.com/sul-dlss/argo.git","svn_url":"https://github.com/sul-dlss/argo","homepage":null,"size":29166,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":78,"forks":1,"open_issues":78,"watchers":12,"default_branch":"develop"}},"base":{"label":"sul-dlss:develop","ref":"develop","sha":"82ebb862b02ab978b8d2c4346e8fe231b1dff753","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":4989164,"name":"argo","full_name":"sul-dlss/argo","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/argo","description":"The administrative discovery interface for Stanford's Digital Object Registry","fork":false,"url":"https://api.github.com/repos/sul-dlss/argo","forks_url":"https://api.github.com/repos/sul-dlss/argo/forks","keys_url":"https://api.github.com/repos/sul-dlss/argo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/argo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/argo/teams","hooks_url":"https://api.github.com/repos/sul-dlss/argo/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/argo/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/argo/events","assignees_url":"https://api.github.com/repos/sul-dlss/argo/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/argo/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/argo/tags","blobs_url":"https://api.github.com/repos/sul-dlss/argo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/argo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/argo/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/argo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/argo/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/argo/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/argo/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/argo/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/argo/subscription","commits_url":"https://api.github.com/repos/sul-dlss/argo/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/argo/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/argo/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/argo/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/argo/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/argo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/argo/merges","archive_url":"https://api.github.com/repos/sul-dlss/argo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/argo/downloads","issues_url":"https://api.github.com/repos/sul-dlss/argo/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/argo/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/argo/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/argo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/argo/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/argo/releases{/id}","created_at":"2012-07-11T13:15:05Z","updated_at":"2015-11-09T08:17:26Z","pushed_at":"2015-11-19T01:06:05Z","git_url":"git://github.com/sul-dlss/argo.git","ssh_url":"git@github.com:sul-dlss/argo.git","clone_url":"https://github.com/sul-dlss/argo.git","svn_url":"https://github.com/sul-dlss/argo","homepage":null,"size":29166,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":78,"forks":1,"open_issues":78,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/228"},"html":{"href":"https://github.com/sul-dlss/argo/pull/228"},"issue":{"href":"https://api.github.com/repos/sul-dlss/argo/issues/228"},"comments":{"href":"https://api.github.com/repos/sul-dlss/argo/issues/228/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/228/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/228/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/argo/statuses/e8ba0f36889d5cfe8704f6a9c1bd7bb4e63af885"}}}}