[ARVADOS] updated: be3c438f10e54c063cd4528931857c89fd411054
git at public.curoverse.com
git at public.curoverse.com
Wed Nov 12 17:11:03 EST 2014
Summary of changes:
services/api/test/fixtures/links.yml | 14 ++++++++++++++
services/api/test/fixtures/repositories.yml | 2 +-
.../functional/arvados/v1/repositories_controller_test.rb | 15 ++++++++-------
3 files changed, 23 insertions(+), 8 deletions(-)
via be3c438f10e54c063cd4528931857c89fd411054 (commit)
from db8f54721e4c101a7491b5c412e0bc51672dc7de (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 be3c438f10e54c063cd4528931857c89fd411054
Author: Brett Smith <brett at curoverse.com>
Date: Wed Nov 12 17:10:55 2014 -0500
4027: Fixup arvados repo fixture to make it more realistic.
diff --git a/services/api/test/fixtures/links.yml b/services/api/test/fixtures/links.yml
index 0d9b06a..4d576a2 100644
--- a/services/api/test/fixtures/links.yml
+++ b/services/api/test/fixtures/links.yml
@@ -250,6 +250,20 @@ runningbarbaz_job_readable_by_spectator:
head_uuid: zzzzz-8i9sb-cjs4pklxxjykyuj
properties: {}
+arvados_repository_readable_by_all_users:
+ uuid: zzzzz-o0j2j-allcanreadarvrp
+ owner_uuid: zzzzz-tpzed-000000000000000
+ created_at: 2014-01-24 20:42:26 -0800
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-000000000000000
+ modified_at: 2014-01-24 20:42:26 -0800
+ updated_at: 2014-01-24 20:42:26 -0800
+ tail_uuid: zzzzz-j7d0g-fffffffffffffff
+ link_class: permission
+ name: can_read
+ head_uuid: zzzzz-s0uqq-arvadosrepo0123
+ properties: {}
+
foo_repository_readable_by_spectator:
uuid: zzzzz-o0j2j-cpy7p41hpk5xxx
owner_uuid: zzzzz-tpzed-000000000000000
diff --git a/services/api/test/fixtures/repositories.yml b/services/api/test/fixtures/repositories.yml
index 38632dd..5775f8a 100644
--- a/services/api/test/fixtures/repositories.yml
+++ b/services/api/test/fixtures/repositories.yml
@@ -5,7 +5,7 @@ crunch_dispatch_test:
arvados:
uuid: zzzzz-s0uqq-arvadosrepo0123
- owner_uuid: zzzzz-j7d0g-fffffffffffffff # all users
+ owner_uuid: zzzzz-tpzed-000000000000000 # root
name: arvados
foo:
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 0793d12..5304bca 100644
--- a/services/api/test/functional/arvados/v1/repositories_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
@@ -43,17 +43,18 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase
end
test "get_all_permissions does not give any access to user without permission" do
+ viewer_uuid = users(:project_viewer).uuid
+ assert_equal(authorized_keys(:project_viewer).authorized_user_uuid,
+ viewer_uuid,
+ "project_viewer must have an authorized_key for this test to work")
authorize_with :admin
get :get_all_permissions
assert_response :success
- assert_equal(authorized_keys(:project_viewer).authorized_user_uuid,
- users(:project_viewer).uuid,
- "project_viewer must have an authorized_key for this test to work")
- json_response['repositories'].each do |repo|
- assert_equal(false,
- repo['user_permissions'].has_key?(users(:project_viewer).uuid),
- "project_viewer user should not have perms for #{repo['uuid']}")
+ readable_repos = json_response["repositories"].select do |repo|
+ repo["user_permissions"].has_key?(viewer_uuid)
end
+ assert_equal(["arvados"], readable_repos.map { |r| r["name"] },
+ "project_viewer should only have permissions on public repos")
end
test "get_all_permissions gives gitolite R to user with read-only access" do
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list