Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
f166d59a
Commit
f166d59a
authored
Jan 29, 2015
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not ssh key box for real users, for now there is an info
box about keys.
parent
4f938478
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
11 deletions
+52
-11
apt/create_instance.in
apt/create_instance.in
+9
-4
www/aptui/instantiate.php
www/aptui/instantiate.php
+31
-2
www/aptui/js/instantiate.js
www/aptui/js/instantiate.js
+3
-5
www/aptui/template/ssh-keys.html
www/aptui/template/ssh-keys.html
+9
-0
No files found.
apt/create_instance.in
View file @
f166d59a
...
...
@@ -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 stor
ed
# in
to the DB by the update script
.
# ask
ed for the current ssh keys from the MA when they logg
ed
# 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
);
...
...
www/aptui/instantiate.php
View file @
f166d59a
...
...
@@ -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
"
;
}
}
#
...
...
www/aptui/js/instantiate.js
View file @
f166d59a
...
...
@@ -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
;
});
...
...
www/aptui/template/ssh-keys.html
View file @
f166d59a
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment