X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/18fecbe7ae84981626f8532c3f3ac730a50ce02a..72d7d41944006d1f48f570784dafe56b9812b0c8:/services/api/test/integration/users_test.rb diff --git a/services/api/test/integration/users_test.rb b/services/api/test/integration/users_test.rb index 4be89a2455..b24ddc5a52 100644 --- a/services/api/test/integration/users_test.rb +++ b/services/api/test/integration/users_test.rb @@ -448,5 +448,22 @@ class UsersTest < ActionDispatch::IntegrationTest assert_match(/Cannot activate without being invited/, json_response['errors'][0]) end + test "bypass_federation only accepted for admins" do + get "/arvados/v1/users", + params: { + bypass_federation: true + }, + headers: auth(:admin) + + assert_response :success + + get "/arvados/v1/users", + params: { + bypass_federation: true + }, + headers: auth(:active) + + assert_response 403 + end end