Merge branch 'master' into 2290-user-activity
[arvados.git] / services / api / app / controllers / arvados / v1 / authorized_keys_controller.rb
index 2a385c2829c1d8d12dd3c250120ecef546013395..d9d2010719ba2372f6d92a7c843d2fcf3373dc89 100644 (file)
@@ -1,30 +1,2 @@
 class Arvados::V1::AuthorizedKeysController < ApplicationController
-  before_filter :admin_required, :only => :get_all_logins
-  def get_all_logins
-    @users = {}
-    User.includes(:authorized_keys).all.each do |u|
-      @users[u.uuid] = u
-    end
-    @response = []
-    @vms = VirtualMachine.includes(:login_permissions).all
-    @vms.each do |vm|
-      vm.login_permissions.each do |perm|
-        user_uuid = perm.tail_uuid
-        @users[user_uuid].andand.authorized_keys.each do |ak|
-          username = perm.properties.andand['username']
-          if username
-            @response << {
-              username: username,
-              hostname: vm.hostname,
-              public_key: ak.public_key,
-              user_uuid: user_uuid,
-              virtual_machine_uuid: vm.uuid,
-              authorized_key_uuid: ak.uuid
-            }
-          end
-        end
-      end
-    end
-    render json: { authorized_keys: @response }
-  end
 end