16306: Merge branch 'master'
[arvados.git] / services / api / lib / create_superuser_token.rb
index c1530162e958d2c8e59b2e8283ef073f33ca54e8..7a18d970582786e860a0378717340e5e6ba3f3f1 100755 (executable)
@@ -40,7 +40,7 @@ module CreateSuperUserToken
           where(user_id: system_user.id).
           where(api_client_id: apiClient.id).
           where_serialized(:scopes, ['all']).
-          where('(expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP AT TIME ZONE ?)', 'UTC').
+          where('(expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)').
           first
 
         # none exist; create one with the supplied token
@@ -54,7 +54,7 @@ module CreateSuperUserToken
         end
       end
 
-      api_client_auth.api_token
+      "v2/" + api_client_auth.uuid + "/" + api_client_auth.api_token
     end
   end
 end