Merge branch '13198-keep-web-metrics'
[arvados.git] / apps / workbench / app / controllers / authorized_keys_controller.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AuthorizedKeysController < ApplicationController
6   def index_pane_list
7     %w(Recent Help)
8   end
9
10   def new
11     super
12     @object.authorized_user_uuid = current_user.uuid if current_user
13     @object.key_type = 'SSH'
14   end
15
16   def create
17     defaults = { authorized_user_uuid: current_user.uuid, key_type: 'SSH' }
18     @object = AuthorizedKey.new defaults.merge(params[:authorized_key] || {})
19     super
20   end
21 end