X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/13fa7a29e911e4c0e2a73375e8d312c9b54da8c2..267c02294d7d5c1f161921f9dade6b692a7029a2:/services/api/lib/current_api_client.rb diff --git a/services/api/lib/current_api_client.rb b/services/api/lib/current_api_client.rb index 37e86976c1..ee666b77ab 100644 --- a/services/api/lib/current_api_client.rb +++ b/services/api/lib/current_api_client.rb @@ -225,6 +225,16 @@ module CurrentApiClient end end + def anonymous_user_token_api_client + $anonymous_user_token_api_client = check_cache $anonymous_user_token_api_client do + act_as_system_user do + ActiveRecord::Base.transaction do + ApiClient.find_or_create_by!(is_trusted: false, url_prefix: "", name: "AnonymousUserToken") + end + end + end + end + def system_root_token_api_client $system_root_token_api_client = check_cache $system_root_token_api_client do act_as_system_user do