[ARVADOS] updated: 1.3.0-1004-gd289f9642

Git user git at public.curoverse.com
Wed Jun 5 20:09:13 UTC 2019


Summary of changes:
 services/api/app/controllers/application_controller.rb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

       via  d289f9642981adc8b332a03caf31fe2a93fd313f (commit)
      from  18ae48a2e9858fdbbe96d7fb0141397310c6044f (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 d289f9642981adc8b332a03caf31fe2a93fd313f
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Wed Jun 5 16:59:29 2019 -0300

    15306: Don't interpret include_trash="false" as include_trash=true.
    
    The same goes to include_old_versions params at find_objects_for_index().
    If any of those params aren't declared as boolean, assume false.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 40c7a8abf..234e8018c 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -165,6 +165,13 @@ class ApplicationController < ActionController::Base
 
   protected
 
+  def bool_param(pname)
+    if params.include?(pname) && params[pname].is_a?(Boolean)
+      return params[pname]
+    end
+    false
+  end
+
   def send_error(*args)
     if args.last.is_a? Hash
       err = args.pop
@@ -189,8 +196,8 @@ class ApplicationController < ActionController::Base
 
   def find_objects_for_index
     @objects ||= model_class.readable_by(*@read_users, {
-      :include_trash => (params[:include_trash] || 'untrash' == action_name),
-      :include_old_versions => params[:include_old_versions]
+      :include_trash => (bool_param(:include_trash) || 'untrash' == action_name),
+      :include_old_versions => bool_param(:include_old_versions)
     })
     apply_where_limit_order_params
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list