X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/07dbd859d0b05d79680570c00c43a722102d7ea3..f170c5a75f22a6db11ca93eed5b0dfc9c65c4270:/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