[ARVADOS] updated: 3c007c51881e1f89b6a7db3af1a09ecfa96f2631
Git user
git at public.curoverse.com
Fri Jun 9 18:36:44 EDT 2017
Summary of changes:
.../api/app/controllers/arvados/v1/collections_controller.rb | 2 +-
.../test/functional/arvados/v1/collections_controller_test.rb | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
via 3c007c51881e1f89b6a7db3af1a09ecfa96f2631 (commit)
from cac20b7dd2177edebc0a4f8087032d1143bd524e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3c007c51881e1f89b6a7db3af1a09ecfa96f2631
Author: radhika <radhika at curoverse.com>
Date: Fri Jun 9 18:34:43 2017 -0400
11821: it appears that the arv command sometimes sends 'include_trash = "false"', which can be misinterpreted as include_trash != null
Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>
diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index 5c09b1f..98f453b 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -22,7 +22,7 @@ class Arvados::V1::CollectionsController < ApplicationController
end
def find_objects_for_index
- if params[:include_trash] || ['destroy', 'trash', 'untrash'].include?(action_name)
+ if params[:include_trash].andand.==(true || "true") || ['destroy', 'trash', 'untrash'].include?(action_name)
@objects = Collection.unscoped.readable_by(*@read_users)
end
super
diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb
index 17af916..9ff5845 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -1065,4 +1065,14 @@ EOS
end
end
end
+
+ test "get collections with bogus include_trash parameter" do
+ authorize_with :active
+ get :index, {
+ filters: [["is_trashed", "=", true]],
+ include_trash: "false",
+ }
+ assert_response :success
+ assert_operator json_response["items"].count, :==, 0
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list