[ARVADOS] updated: b4e586171f3fa3eab6b11f4fa4c71c346b2812e7

Git user git at public.curoverse.com
Tue Oct 25 10:51:21 EDT 2016


Summary of changes:
 services/api/app/controllers/arvados/v1/containers_controller.rb      | 1 +
 services/api/app/models/container.rb                                  | 2 +-
 services/api/test/fixtures/collections.yml                            | 2 +-
 services/api/test/functional/arvados/v1/containers_controller_test.rb | 1 -
 services/api/test/unit/container_test.rb                              | 2 +-
 5 files changed, 4 insertions(+), 4 deletions(-)

       via  b4e586171f3fa3eab6b11f4fa4c71c346b2812e7 (commit)
      from  6362c17d947b16db1e2b71f7a06da9c930ef9778 (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 b4e586171f3fa3eab6b11f4fa4c71c346b2812e7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Oct 25 10:51:14 2016 -0400

    10172: Add skip_before_filter :find_object_by_uuid for current.  Typo fixes.

diff --git a/services/api/app/controllers/arvados/v1/containers_controller.rb b/services/api/app/controllers/arvados/v1/containers_controller.rb
index 3495459..7728ce6 100644
--- a/services/api/app/controllers/arvados/v1/containers_controller.rb
+++ b/services/api/app/controllers/arvados/v1/containers_controller.rb
@@ -4,6 +4,7 @@ class Arvados::V1::ContainersController < ApplicationController
   accept_attribute_as_json :runtime_constraints, Hash
   accept_attribute_as_json :command, Array
 
+  skip_before_filter :find_object_by_uuid, only: [:current]
   skip_before_filter :render_404_if_no_object, only: [:current]
 
   def auth
diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index ac2708c..b1ea9bd 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -277,7 +277,7 @@ class Container < ArvadosModel
   end
 
   def validate_output
-    # Output must be exist and be readable by the current user.  This is so
+    # Output must exist and be readable by the current user.  This is so
     # that a container cannot "claim" a collection that it doesn't otherwise
     # have access to just by setting the output field to the collection PDH.
     if output_changed?
diff --git a/services/api/test/fixtures/collections.yml b/services/api/test/fixtures/collections.yml
index bd7b62e..2272b0f 100644
--- a/services/api/test/fixtures/collections.yml
+++ b/services/api/test/fixtures/collections.yml
@@ -576,7 +576,7 @@ collection_not_readable_by_active:
   modified_at: 2014-02-03T17:22:54Z
   updated_at: 2014-02-03T17:22:54Z
   manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
-  name: owned_by_active
+  name: collection_not_readable_by_active
 
 
 # Test Helper trims the rest of the file
diff --git a/services/api/test/functional/arvados/v1/containers_controller_test.rb b/services/api/test/functional/arvados/v1/containers_controller_test.rb
index d923e01..65a1a91 100644
--- a/services/api/test/functional/arvados/v1/containers_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/containers_controller_test.rb
@@ -90,7 +90,6 @@ class Arvados::V1::ContainersControllerTest < ActionController::TestCase
 
   test 'get current container for token' do
     authorize_with :running_container_auth
-    c = Container.where(auth_uuid: Thread.current[:api_client_authorization].uuid).first
     get :current
     assert_response :success
     assert_equal containers(:running).uuid, json_response['uuid']
diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb
index ebd98e6..4fd9f8e 100644
--- a/services/api/test/unit/container_test.rb
+++ b/services/api/test/unit/container_test.rb
@@ -463,7 +463,7 @@ class ContainerTest < ActiveSupport::TestCase
     end
   end
 
-  test "output must be readable by auth_uuid" do
+  test "not allowed to set output that is not readable by current user" do
     c, _ = minimal_new
     set_user_from_auth :dispatch1
     c.lock

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list