From: radhika Date: Wed, 30 Jul 2014 14:32:43 +0000 (-0400) Subject: 3193: update the ssh popup to not require name. X-Git-Tag: 1.1.0~2388^2~21 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/c378aa30f0942a58f3f504edf61233296d671eff 3193: update the ssh popup to not require name. --- diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index 836c185242..805d0d2e80 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -263,6 +263,11 @@ class UsersController < ApplicationController key_params['public_key'] = params['public_key'] end + if !key_params['name'] + split_key = key_params['public_key'].split + key_params['name'] = split_key[-1] if (split_key.size == 3) + end + new_key = AuthorizedKey.create! key_params if new_key format.js diff --git a/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb b/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb index 283154f174..83299813ac 100644 --- a/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb +++ b/apps/workbench/app/views/users/_add_ssh_key_popup.html.erb @@ -18,14 +18,14 @@ style: "font-weight: bold", target: "_blank" %> -
- - -