{"action":"created","comment":{"url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/comments/92054509","pull_request_review_id":12564391,"id":92054509,"diff_hunk":"@@ -5,18 +5,26 @@ class Ability\n   \n   # Define any customized permissions here.\n   def custom_permissions\n-    # Limits deleting objects to admin users\n-    #\n     if current_user.groups.include? :admin.to_s\n        can [:discover, :read, :edit], Collection\n        can [:discover, :read, :edit], GenericFile\n+       can [:download], FileContentDatastream\n        can [:destroy], ActiveFedora::Base\n     end\n+  end\n+\n+  def download_permissions\n+    can :download, ActiveFedora::File do |file|\n+      parent_uri = file.uri.to_s.sub(/\\/[^\\/]*$/, '')\n+      parent_id = ActiveFedora::Base.uri_to_id parent_uri\n+      can? :read, parent_id\n+    end\n \n-    # Limits creating new objects to a specific group\n-    #\n-    # if user_groups.include? 'special_group'\n-    #   can [:create], ActiveFedora::Base\n-    # end\n+    repository_path = \"/home/nrogers/repository\"\n+    can :download, ExternalFileContentDatastream do |path|","path":"app/models/ability.rb","position":27,"original_position":27,"commit_id":"d3f9786a0337d0a5ec4a4705a54af051aa66ffde","original_commit_id":"d3f9786a0337d0a5ec4a4705a54af051aa66ffde","user":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"body":"No longer need this with refactoring","created_at":"2016-12-12T22:22:28Z","updated_at":"2016-12-12T22:22:28Z","html_url":"https://github.com/ClevelandArtGIT/cma-archives/pull/53#discussion_r92054509","pull_request_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/comments/92054509"},"html":{"href":"https://github.com/ClevelandArtGIT/cma-archives/pull/53#discussion_r92054509"},"pull_request":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53","id":97209660,"html_url":"https://github.com/ClevelandArtGIT/cma-archives/pull/53","diff_url":"https://github.com/ClevelandArtGIT/cma-archives/pull/53.diff","patch_url":"https://github.com/ClevelandArtGIT/cma-archives/pull/53.patch","issue_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/53","number":53,"state":"open","locked":false,"title":"External files support","user":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"body":"Rather than loading files from Fedora store them in an outside repository using the magic MIME type. This should make upgrades / migrations much easier as well as offering the potential to migrate to alternate platforms.\r\n\r\nCurrently the files need to be manually ingested but the next step will be adding an Ingest Step that copies them into the repository. Test coverage is also needed.","created_at":"2016-12-08T22:01:32Z","updated_at":"2016-12-12T22:22:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53/commits","review_comments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53/comments","review_comment_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/53/comments","statuses_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/statuses/d3f9786a0337d0a5ec4a4705a54af051aa66ffde","head":{"label":"ClevelandArtGIT:external-files","ref":"external-files","sha":"d3f9786a0337d0a5ec4a4705a54af051aa66ffde","user":{"login":"ClevelandArtGIT","id":3742139,"avatar_url":"https://avatars.githubusercontent.com/u/3742139?v=3","gravatar_id":"","url":"https://api.github.com/users/ClevelandArtGIT","html_url":"https://github.com/ClevelandArtGIT","followers_url":"https://api.github.com/users/ClevelandArtGIT/followers","following_url":"https://api.github.com/users/ClevelandArtGIT/following{/other_user}","gists_url":"https://api.github.com/users/ClevelandArtGIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ClevelandArtGIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClevelandArtGIT/subscriptions","organizations_url":"https://api.github.com/users/ClevelandArtGIT/orgs","repos_url":"https://api.github.com/users/ClevelandArtGIT/repos","events_url":"https://api.github.com/users/ClevelandArtGIT/events{/privacy}","received_events_url":"https://api.github.com/users/ClevelandArtGIT/received_events","type":"User","site_admin":false},"repo":{"id":31037901,"name":"cma-archives","full_name":"ClevelandArtGIT/cma-archives","owner":{"login":"ClevelandArtGIT","id":3742139,"avatar_url":"https://avatars.githubusercontent.com/u/3742139?v=3","gravatar_id":"","url":"https://api.github.com/users/ClevelandArtGIT","html_url":"https://github.com/ClevelandArtGIT","followers_url":"https://api.github.com/users/ClevelandArtGIT/followers","following_url":"https://api.github.com/users/ClevelandArtGIT/following{/other_user}","gists_url":"https://api.github.com/users/ClevelandArtGIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ClevelandArtGIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClevelandArtGIT/subscriptions","organizations_url":"https://api.github.com/users/ClevelandArtGIT/orgs","repos_url":"https://api.github.com/users/ClevelandArtGIT/repos","events_url":"https://api.github.com/users/ClevelandArtGIT/events{/privacy}","received_events_url":"https://api.github.com/users/ClevelandArtGIT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ClevelandArtGIT/cma-archives","description":"Hydra pilot for archiving institutional content","fork":false,"url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives","forks_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/forks","keys_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/teams","hooks_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/hooks","issue_events_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/events{/number}","events_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/events","assignees_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/assignees{/user}","branches_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/branches{/branch}","tags_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/tags","blobs_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/statuses/{sha}","languages_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/languages","stargazers_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/stargazers","contributors_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/contributors","subscribers_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/subscribers","subscription_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/subscription","commits_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/contents/{+path}","compare_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/merges","archive_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/downloads","issues_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues{/number}","pulls_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls{/number}","milestones_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/milestones{/number}","notifications_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/labels{/name}","releases_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/releases{/id}","deployments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/deployments","created_at":"2015-02-19T21:29:45Z","updated_at":"2016-10-24T18:51:36Z","pushed_at":"2016-12-12T22:19:38Z","git_url":"git://github.com/ClevelandArtGIT/cma-archives.git","ssh_url":"git@github.com:ClevelandArtGIT/cma-archives.git","clone_url":"https://github.com/ClevelandArtGIT/cma-archives.git","svn_url":"https://github.com/ClevelandArtGIT/cma-archives","homepage":null,"size":1318,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"ClevelandArtGIT:master","ref":"master","sha":"b70657c548b0afebc61642ac9874d5a981f80b8f","user":{"login":"ClevelandArtGIT","id":3742139,"avatar_url":"https://avatars.githubusercontent.com/u/3742139?v=3","gravatar_id":"","url":"https://api.github.com/users/ClevelandArtGIT","html_url":"https://github.com/ClevelandArtGIT","followers_url":"https://api.github.com/users/ClevelandArtGIT/followers","following_url":"https://api.github.com/users/ClevelandArtGIT/following{/other_user}","gists_url":"https://api.github.com/users/ClevelandArtGIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ClevelandArtGIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClevelandArtGIT/subscriptions","organizations_url":"https://api.github.com/users/ClevelandArtGIT/orgs","repos_url":"https://api.github.com/users/ClevelandArtGIT/repos","events_url":"https://api.github.com/users/ClevelandArtGIT/events{/privacy}","received_events_url":"https://api.github.com/users/ClevelandArtGIT/received_events","type":"User","site_admin":false},"repo":{"id":31037901,"name":"cma-archives","full_name":"ClevelandArtGIT/cma-archives","owner":{"login":"ClevelandArtGIT","id":3742139,"avatar_url":"https://avatars.githubusercontent.com/u/3742139?v=3","gravatar_id":"","url":"https://api.github.com/users/ClevelandArtGIT","html_url":"https://github.com/ClevelandArtGIT","followers_url":"https://api.github.com/users/ClevelandArtGIT/followers","following_url":"https://api.github.com/users/ClevelandArtGIT/following{/other_user}","gists_url":"https://api.github.com/users/ClevelandArtGIT/gists{/gist_id}","starred_url":"https://api.github.com/users/ClevelandArtGIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClevelandArtGIT/subscriptions","organizations_url":"https://api.github.com/users/ClevelandArtGIT/orgs","repos_url":"https://api.github.com/users/ClevelandArtGIT/repos","events_url":"https://api.github.com/users/ClevelandArtGIT/events{/privacy}","received_events_url":"https://api.github.com/users/ClevelandArtGIT/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ClevelandArtGIT/cma-archives","description":"Hydra pilot for archiving institutional content","fork":false,"url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives","forks_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/forks","keys_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/teams","hooks_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/hooks","issue_events_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/events{/number}","events_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/events","assignees_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/assignees{/user}","branches_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/branches{/branch}","tags_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/tags","blobs_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/statuses/{sha}","languages_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/languages","stargazers_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/stargazers","contributors_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/contributors","subscribers_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/subscribers","subscription_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/subscription","commits_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/contents/{+path}","compare_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/merges","archive_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/downloads","issues_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues{/number}","pulls_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls{/number}","milestones_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/milestones{/number}","notifications_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/labels{/name}","releases_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/releases{/id}","deployments_url":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/deployments","created_at":"2015-02-19T21:29:45Z","updated_at":"2016-10-24T18:51:36Z","pushed_at":"2016-12-12T22:19:38Z","git_url":"git://github.com/ClevelandArtGIT/cma-archives.git","ssh_url":"git@github.com:ClevelandArtGIT/cma-archives.git","clone_url":"https://github.com/ClevelandArtGIT/cma-archives.git","svn_url":"https://github.com/ClevelandArtGIT/cma-archives","homepage":null,"size":1318,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53"},"html":{"href":"https://github.com/ClevelandArtGIT/cma-archives/pull/53"},"issue":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/53"},"comments":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/ClevelandArtGIT/cma-archives/statuses/d3f9786a0337d0a5ec4a4705a54af051aa66ffde"}}}}
{"actor":{"display_login":"narogers"}}