X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a4a3227c634d8cfd54a23205be727e910032cbe9..66fc74001e777ac7ceff2b02cfc459b1368f42f3:/services/api/lib/create_superuser_token.rb?ds=sidebyside diff --git a/services/api/lib/create_superuser_token.rb b/services/api/lib/create_superuser_token.rb index 84100c2efd..57eac048a9 100755 --- a/services/api/lib/create_superuser_token.rb +++ b/services/api/lib/create_superuser_token.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + # Install the supplied string (or a randomly generated token, if none # is given) as an API token that authenticates to the system user account. @@ -26,7 +30,9 @@ module CreateSuperUserToken # need to create a token if !api_client_auth # Get (or create) trusted api client - apiClient = ApiClient.find_or_create_by_url_prefix_and_is_trusted("ssh://root@localhost/", true) + apiClient = ApiClient. + find_or_create_by(url_prefix: "ssh://root@localhost/", + is_trusted: true) # Check if there is an unexpired superuser token corresponding to this api client api_client_auth =