Merge branch '1694-user-agreement'
[arvados.git] / apps / workbench / app / controllers / authorized_keys_controller.rb
1 class AuthorizedKeysController < ApplicationController
2   def new
3     super
4     @object.authorized_user_uuid = current_user.uuid if current_user
5     @object.key_type = 'SSH'
6   end
7
8   def create
9     defaults = { authorized_user_uuid: current_user.uuid, key_type: 'SSH' }
10     @object = AuthorizedKey.new defaults.merge(params[:authorized_key] || {})
11     super
12   end
13 end