X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6bf9e1a4b5640f3cdd057810f0c9b8a945bb88bd..c0924347a69157d3058a39d238fb0e0bacefa3a2:/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