X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/045e3127cb48845c7d988d01488c055f02ae2ec3..f41534fcdfa95c282a04d64158f8a7d850637768:/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