Merge branch '2411-check-copyright'
[arvados.git] / apps / workbench / app / controllers / authorized_keys_controller.rb
index a2beb494e41149b60e1981eaf6b9bbd6aa5ed39e..ac47ce7592b27a3082d20582092147259d689806 100644 (file)
@@ -1,4 +1,12 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class AuthorizedKeysController < ApplicationController
+  def index_pane_list
+    %w(Recent Help)
+  end
+
   def new
     super
     @object.authorized_user_uuid = current_user.uuid if current_user
@@ -6,7 +14,8 @@ class AuthorizedKeysController < ApplicationController
   end
 
   def create
-    @object = AuthorizedKey.new authorized_user_uuid: current_user.uuid, key_type: 'SSH'
+    defaults = { authorized_user_uuid: current_user.uuid, key_type: 'SSH' }
+    @object = AuthorizedKey.new defaults.merge(params[:authorized_key] || {})
     super
   end
 end