Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
if params[:include_trash] || ['destroy', 'trash', 'untrash'].include?(action_name)
opts.update({include_trash: true})
end
- if params[:include_old_versions]
+ if params[:include_old_versions] || @include_old_versions
opts.update({include_old_versions: true})
end
@objects = Collection.readable_by(*@read_users, opts) if !opts.empty?
end
def find_object_by_uuid
+ @include_old_versions = true
+
if loc = Keep::Locator.parse(params[:id])
loc.strip_hints!
end
end
+ test 'can get old version collection by uuid' do
+ authorize_with :active
+ get :show, {
+ id: collections(:collection_owned_by_active_past_version_1).uuid,
+ }
+ assert_response :success
+ assert_equal collections(:collection_owned_by_active_past_version_1).name,
+ json_response['name']
+ end
+
test 'version and current_version_uuid are ignored at creation time' do
permit_unsigned_manifests
authorize_with :active