X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/18d976b4701d76bdeb05e0fe3c1757060d3b8a2a..9551b59d3aab67f77240b90bbb550faec6b2a7d9:/services/api/test/functional/arvados/v1/users_controller_test.rb diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb index ae7b21dec8..6a7b00a005 100644 --- a/services/api/test/functional/arvados/v1/users_controller_test.rb +++ b/services/api/test/functional/arvados/v1/users_controller_test.rb @@ -674,6 +674,12 @@ The Arvados team. get(:index) check_non_admin_index check_readable_users_index [:spectator], [:inactive, :active] + json_response["items"].each do |u| + if u["uuid"] == users(:spectator).uuid + assert_equal true, u["can_write"] + assert_equal true, u["can_manage"] + end + end end test "non-admin user gets only safe attributes from users#show" do @@ -1079,7 +1085,7 @@ The Arvados team. end NON_ADMIN_USER_DATA = ["uuid", "kind", "is_active", "email", "first_name", - "last_name", "username"].sort + "last_name", "username", "can_write", "can_manage"].sort def check_non_admin_index assert_response :success