projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
13164: Lock tables in order when locking a container.
[arvados.git]
/
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 97348d5fb4b7a9458089016dc280778559365185..49638677b18cddaeb9f27501c9d02f58d34a93f2 100644
(file)
--- a/
services/api/lib/current_api_client.rb
+++ b/
services/api/lib/current_api_client.rb
@@
-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
$system_user = nil
$system_group = nil
$all_users_group = nil
@@
-130,18
+134,12
@@
module CurrentApiClient
end
def act_as_user user
end
def act_as_user user
- #auth_was = Thread.current[:api_client_authorization]
user_was = Thread.current[:user]
Thread.current[:user] = user
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
begin
yield
ensure
Thread.current[:user] = user_was
- #Thread.current[:api_client_authorization] = auth_was
end
end
end
end