Merge branch '13076-r-autogen-api'
[arvados.git] / services / api / lib / current_api_client.rb
index 97348d5fb4b7a9458089016dc280778559365185..49638677b18cddaeb9f27501c9d02f58d34a93f2 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 $system_user = nil
 $system_group = nil
 $all_users_group = nil
@@ -130,18 +134,12 @@ module CurrentApiClient
   end
 
   def act_as_user user
-    #auth_was = Thread.current[:api_client_authorization]
     user_was = Thread.current[:user]
     Thread.current[:user] = user
-    #Thread.current[:api_client_authorization] = ApiClientAuthorization.
-    #  where('user_id=? and scopes is null', user.id).
-    #  order('expires_at desc').
-    #  first
     begin
       yield
     ensure
       Thread.current[:user] = user_was
-      #Thread.current[:api_client_authorization] = auth_was
     end
   end