Commit f166d59a authored by Leigh B Stoller's avatar Leigh B Stoller

Do not ssh key box for real users, for now there is an info

box about keys.
parent 4f938478
......@@ -451,8 +451,8 @@ if ($localuser) {
if ($emulab_user->IsNonLocal()) {
#
# A user created from a Geni certificate via geni-login. We
# ask for the current ssh keys from the MA. They are stored
# into the DB by the update script.
# asked for the current ssh keys from the MA when they logged
# in, but we ask again to make sure have the latest keys.
#
system("$UPDATEGENIUSER -s " . $emulab_user->uid());
if (0) {
......@@ -463,6 +463,12 @@ if ($localuser) {
$pid = "CloudLab";
}
elsif (defined($sshkey) && !$emulab_user->LookupSSHKey($sshkey)) {
#
# XXX This is deprecated; we no longer show the ssh box to
# real users. Remove when we are satisfied with new
# ssh key management page.
#
#
# A local user. We mark keys that come through this path
# with the isaptkey flag (-a to addpubkey) so that we know
......@@ -515,8 +521,7 @@ elsif (!$localuser) {
if (defined($sshkey)) { #
# Guest user; remember key. For now we accept only one key. We store
# it simply so we can display it again for the user in the web
# interface. We allow key reuse for existing users, see
# above.
# interface. We allow key reuse for existing users, see above.
#
$geniuser->DeleteKeys();
$geniuser->AddKey($sshkey);
......
......@@ -396,7 +396,13 @@ function SPITFORM($formfields, $newuser, $errors)
echo " <div id='selected_profile_description'></div>\n";
echo "</div>";
echo "<div class='panel-footer'>";
echo "<button id='profile' class='btn btn-primary btn-md pull-right'
if (isset($this_user)) {
echo "<button class='btn btn-default btn-sm pull-left'
type='button' id='profile_copy_button'>
Copy Profile
</button>";
}
echo "<button id='profile' class='btn btn-primary btn-sm pull-right'
type='button' name='profile_button'>
Change Profile
</button>";
......@@ -415,7 +421,30 @@ function SPITFORM($formfields, $newuser, $errors)
echo "<input type='hidden' name='profile' value='$thisuuid'>\n";
}
if (isset($this_user)) {
$spitsshkeystuff();
#
# Local users, show a link to the ssh keys page.
# Nonlocal users, remind them ssh keys go into their portal.
#
if ($this_user->IsNonLocal()) {
echo "<div>";
echo " <div class='col-md-12 bg-info'
style='margin-top: -5px; margin-bottom: 10px;'>
GENI Users; be sure to add ssh keys at <b>your</b> portal if
you want to log in from your desktop, else you
will be limited to using a shell window in your browser.
</div>
</div>\n";
}
else {
echo "<div>";
echo " <div class='col-md-12 bg-info'
style='margin-top: -5px; margin-bottom: 10px;'>
<a href='ssh-keys.php'>Manage your SSH keys</a> if
you want to log in from your desktop, else you
will be limited to using a shell window in your browser.
</div>
</div>\n";
}
}
#
......
......@@ -81,12 +81,10 @@ function (_, sup, ppstart, aboutaptString, aboutcloudString, waitwaitString)
if (!registered) {
sup.SpitOops("oops", "You must be a registered user to copy " +
"a profile.");
return;
}
else {
var url = "manage_profile.php?action=copy&uuid=" +
selected_uuid;
window.location.replace(url);
}
var url = "manage_profile.php?action=copy&uuid=" + selected_uuid;
window.location.replace(url);
return false;
});
......
......@@ -52,6 +52,15 @@
<div class="panel-body">
<form id='add_sshkey_form'
class='form-horizontal' role='form'>
<span class='help-block col-sm-offset-2 col-sm-10'>
Upload a file or paste it in the text box. This will
allow you to login using your favorite ssh client. Without
a SSH key, you will be limited to using a shell window in
your browser. Don't know how to generate your SSH key?
See
<a href='https://help.github.com/articles/generating-ssh-keys'>
this tutorial.</a>
</span>
<div class="form-group">
<label for="sshkey_data"
class="col-sm-2 control-label">Key</label>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment