[ARVADOS] updated: eae753b5e9955b1c3e29782c983c25a3cb165781

Git user git at public.curoverse.com
Thu Jun 8 14:56:24 EDT 2017


Summary of changes:
 services/api/app/models/arvados_model.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

  discards  0e4624a002af66d14fb9f60111543932416dae58 (commit)
       via  eae753b5e9955b1c3e29782c983c25a3cb165781 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0e4624a002af66d14fb9f60111543932416dae58)
            \
             N -- N -- N (eae753b5e9955b1c3e29782c983c25a3cb165781)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 eae753b5e9955b1c3e29782c983c25a3cb165781
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jun 8 14:21:21 2017 -0400

    11837: Fix "include_trash" scope and test case.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom 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 73a7e09..e3c10b7 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -13,7 +13,7 @@ class Arvados::V1::CollectionsController < ApplicationController
 
   def find_objects_for_index
     if params[:include_trash] || ['destroy', 'trash', 'untrash'].include?(action_name)
-      @objects = Collection.readable_by(*@read_users).unscoped
+      @objects = Collection.unscoped.readable_by(*@read_users)
     end
     super
   end
diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb
index bb33c55..d1a0bc5 100644
--- a/services/api/app/models/arvados_model.rb
+++ b/services/api/app/models/arvados_model.rb
@@ -250,7 +250,8 @@ class ArvadosModel < ActiveRecord::Base
 
     # Check if any of the users are admin.  If so, we're done.
     if users_list.select { |u| u.is_admin }.any?
-      return self
+      # Return existing relation with no new filters.
+      return where({})
     end
 
     # Collect the UUIDs of the authorized users.
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 055af9e..17af916 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -1045,7 +1045,7 @@ EOS
 
   [:active, :admin].each do |user|
     test "get trashed collections as #{user}" do
-      authorize_with :active
+      authorize_with user
       get :index, {
         filters: [["is_trashed", "=", true]],
         include_trash: true,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list