{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments/39159152","id":39159152,"diff_hunk":"@@ -46,10 +45,22 @@ def create\n   # @raises CanCan::AccessDenied if the document is not found\n   #   or the user doesn't have access to it.\n   def show\n-    _, document_list = search_results(params, CatalogController.search_params_logic + [:find_one])\n-    curation_concern = document_list.first\n-    raise CanCan::AccessDenied.new(nil, :show) unless curation_concern\n-    @presenter = show_presenter.new(curation_concern, current_ability)\n+    respond_to do |wants|\n+      wants.html do\n+        _, document_list = search_results(params, CatalogController.search_params_logic + [:find_one])\n+        curation_concern = document_list.first\n+        raise CanCan::AccessDenied.new(nil, :show) unless curation_concern\n+        @presenter = show_presenter.new(curation_concern, current_ability)\n+      end\n+      wants.json do\n+        # load and authorize @curation_concern manually\n+        # This has to use #find instead of #load_instance_from_solr because\n+        # we want to return values like generic_file_ids in the json\n+        @curation_concern = curation_concern_type.find(params[:id]) unless curation_concern\n+        authorize! :show, @curation_concern","path":"app/controllers/concerns/curation_concerns/curation_concern_controller.rb","position":40,"original_position":40,"commit_id":"9006cd82892dbe3c770fd65c421e291e1057beff","original_commit_id":"9006cd82892dbe3c770fd65c421e291e1057beff","user":{"login":"cam156","id":1599081,"avatar_url":"https://avatars.githubusercontent.com/u/1599081?v=3","gravatar_id":"","url":"https://api.github.com/users/cam156","html_url":"https://github.com/cam156","followers_url":"https://api.github.com/users/cam156/followers","following_url":"https://api.github.com/users/cam156/following{/other_user}","gists_url":"https://api.github.com/users/cam156/gists{/gist_id}","starred_url":"https://api.github.com/users/cam156/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cam156/subscriptions","organizations_url":"https://api.github.com/users/cam156/orgs","repos_url":"https://api.github.com/users/cam156/repos","events_url":"https://api.github.com/users/cam156/events{/privacy}","received_events_url":"https://api.github.com/users/cam156/received_events","type":"User","site_admin":false},"body":"I would expect the authorization to have already occurred.  Are you expecting different authorization levels for the solr document and the fedora document?","created_at":"2015-09-10T13:28:41Z","updated_at":"2015-09-10T13:28:41Z","html_url":"https://github.com/projecthydra-labs/curation_concerns/pull/320#discussion_r39159152","pull_request_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320","_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments/39159152"},"html":{"href":"https://github.com/projecthydra-labs/curation_concerns/pull/320#discussion_r39159152"},"pull_request":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320","id":44604965,"html_url":"https://github.com/projecthydra-labs/curation_concerns/pull/320","diff_url":"https://github.com/projecthydra-labs/curation_concerns/pull/320.diff","patch_url":"https://github.com/projecthydra-labs/curation_concerns/pull/320.patch","issue_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/320","number":320,"state":"open","locked":false,"title":"adds support for restful JSON responses","user":{"login":"flyingzumwalt","id":138930,"avatar_url":"https://avatars.githubusercontent.com/u/138930?v=3","gravatar_id":"","url":"https://api.github.com/users/flyingzumwalt","html_url":"https://github.com/flyingzumwalt","followers_url":"https://api.github.com/users/flyingzumwalt/followers","following_url":"https://api.github.com/users/flyingzumwalt/following{/other_user}","gists_url":"https://api.github.com/users/flyingzumwalt/gists{/gist_id}","starred_url":"https://api.github.com/users/flyingzumwalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyingzumwalt/subscriptions","organizations_url":"https://api.github.com/users/flyingzumwalt/orgs","repos_url":"https://api.github.com/users/flyingzumwalt/repos","events_url":"https://api.github.com/users/flyingzumwalt/events{/privacy}","received_events_url":"https://api.github.com/users/flyingzumwalt/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-09T21:49:52Z","updated_at":"2015-09-10T13:28:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb7d34fb117d5181edb8e9f119f341466bddaecc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320/commits","review_comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320/comments","review_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/320/comments","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/9006cd82892dbe3c770fd65c421e291e1057beff","head":{"label":"projecthydra-labs:json_api","ref":"json_api","sha":"9006cd82892dbe3c770fd65c421e291e1057beff","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":35563024,"name":"curation_concerns","full_name":"projecthydra-labs/curation_concerns","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/curation_concerns","description":"A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns","forks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/releases{/id}","created_at":"2015-05-13T17:17:45Z","updated_at":"2015-09-03T14:31:28Z","pushed_at":"2015-09-10T13:23:40Z","git_url":"git://github.com/projecthydra-labs/curation_concerns.git","ssh_url":"git@github.com:projecthydra-labs/curation_concerns.git","clone_url":"https://github.com/projecthydra-labs/curation_concerns.git","svn_url":"https://github.com/projecthydra-labs/curation_concerns","homepage":"","size":4838,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":35,"forks":5,"open_issues":35,"watchers":3,"default_branch":"master"}},"base":{"label":"projecthydra-labs:master","ref":"master","sha":"5b7a872b5b0b84d5563a8f6de2a8bb8fd655c368","user":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":35563024,"name":"curation_concerns","full_name":"projecthydra-labs/curation_concerns","owner":{"login":"projecthydra-labs","id":7377013,"avatar_url":"https://avatars.githubusercontent.com/u/7377013?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra-labs","html_url":"https://github.com/projecthydra-labs","followers_url":"https://api.github.com/users/projecthydra-labs/followers","following_url":"https://api.github.com/users/projecthydra-labs/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra-labs/subscriptions","organizations_url":"https://api.github.com/users/projecthydra-labs/orgs","repos_url":"https://api.github.com/users/projecthydra-labs/repos","events_url":"https://api.github.com/users/projecthydra-labs/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra-labs/curation_concerns","description":"A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.","fork":false,"url":"https://api.github.com/repos/projecthydra-labs/curation_concerns","forks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/forks","keys_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/teams","hooks_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/hooks","issue_events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/events","assignees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/tags","blobs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/languages","stargazers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/stargazers","contributors_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contributors","subscribers_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscribers","subscription_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/subscription","commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/merges","archive_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/downloads","issues_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra-labs/curation_concerns/releases{/id}","created_at":"2015-05-13T17:17:45Z","updated_at":"2015-09-03T14:31:28Z","pushed_at":"2015-09-10T13:23:40Z","git_url":"git://github.com/projecthydra-labs/curation_concerns.git","ssh_url":"git@github.com:projecthydra-labs/curation_concerns.git","clone_url":"https://github.com/projecthydra-labs/curation_concerns.git","svn_url":"https://github.com/projecthydra-labs/curation_concerns","homepage":"","size":4838,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":35,"forks":5,"open_issues":35,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320"},"html":{"href":"https://github.com/projecthydra-labs/curation_concerns/pull/320"},"issue":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/320"},"comments":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra-labs/curation_concerns/statuses/9006cd82892dbe3c770fd65c421e291e1057beff"}}}}