Merge branch 'master' into 3219-further-docker-improvements
[arvados.git] / apps / workbench / app / controllers / users_controller.rb
index 863876137fdab5f941740e5f7bd30187415c6099..0313de5aa2e7b9559146b9cfca7a6f31b166862d 100644 (file)
@@ -1,6 +1,5 @@
 class UsersController < ApplicationController
   skip_before_filter :find_object_by_uuid, :only => [:welcome, :activity, :storage]
-  skip_around_filter :thread_with_mandatory_api_token, :only => :welcome
   before_filter :ensure_current_user_is_admin, only: [:sudo, :unsetup, :setup]
 
   def welcome
@@ -107,11 +106,11 @@ class UsersController < ApplicationController
   end
 
   def sudo
-    resp = $arvados_api_client.api(ApiClientAuthorization, '', {
-                                     api_client_authorization: {
-                                       owner_uuid: @object.uuid
-                                     }
-                                   })
+    resp = arvados_api_client.api(ApiClientAuthorization, '', {
+                                    api_client_authorization: {
+                                      owner_uuid: @object.uuid
+                                    }
+                                  })
     redirect_to root_url(api_token: resp[:api_token])
   end