[ARVADOS] updated: fdcb867b94ad0d44040c54bbe8fb4f07351c281c

git at public.curoverse.com git at public.curoverse.com
Tue Feb 4 10:59:26 EST 2014


Summary of changes:
 .../arvados/v1/repositories_controller.rb          |    2 ++
 .../arvados/v1/repositories_controller_test.rb     |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

       via  fdcb867b94ad0d44040c54bbe8fb4f07351c281c (commit)
      from  4bc4165ea8acbcfb2c1a19e0793a52c48d04cc59 (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 fdcb867b94ad0d44040c54bbe8fb4f07351c281c
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 4 07:58:25 2014 -0800

    Fix (and add test for) 404 at repositories.get_all_permissions.

diff --git a/services/api/app/controllers/arvados/v1/repositories_controller.rb b/services/api/app/controllers/arvados/v1/repositories_controller.rb
index 6ba98c8..19504e1 100644
--- a/services/api/app/controllers/arvados/v1/repositories_controller.rb
+++ b/services/api/app/controllers/arvados/v1/repositories_controller.rb
@@ -1,4 +1,6 @@
 class Arvados::V1::RepositoriesController < ApplicationController
+  skip_before_filter :find_object_by_uuid, :only => :get_all_permissions
+  skip_before_filter :render_404_if_no_object, :only => :get_all_permissions
   before_filter :admin_required, :only => :get_all_permissions
   def get_all_permissions
     @users = {}
diff --git a/services/api/test/functional/arvados/v1/repositories_controller_test.rb b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
index 1d4d88f..f6280ec 100644
--- a/services/api/test/functional/arvados/v1/repositories_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
@@ -1,4 +1,15 @@
 require 'test_helper'
 
 class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase
+  test "should get_all_logins with admin token" do
+    authorize_with :admin
+    get :get_all_permissions
+    assert_response :success
+  end
+
+  test "should get_all_logins with non-admin token" do
+    authorize_with :active
+    get :get_all_permissions
+    assert_response 403
+  end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list