Skip to content

Commit

Permalink
Fix crash on downloading GenericAsset datastreams
Browse files Browse the repository at this point in the history
  • Loading branch information
jechols committed Feb 11, 2015
1 parent b618807 commit cb2f875
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/controllers/downloads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ def send_content(asset)
end

def can_download?
return super if datastream_to_show == default_content_ds && default_content_ds.dsid != "content"
return true if default_content_ds.dsid == "content" && current_ability.can?(:download, asset.class)
return true if current_ability.can?(:create, asset.class)
false
return super || current_ability.can?(:create, asset.class)
end
end

0 comments on commit cb2f875

Please sign in to comment.