Do not ignore attributes received with create request.
[arvados.git] / apps / workbench / app / controllers / authorized_keys_controller.rb
index a2beb494e41149b60e1981eaf6b9bbd6aa5ed39e..4487ead95a426a8a878bdecc486acc9f4b36f33f 100644 (file)
@@ -6,7 +6,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