Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
81717fed
Commit
81717fed
authored
Sep 22, 2015
by
Leigh B Stoller
Browse files
Allow Geni users to create and instantiate geni-lib scripts,
now that we have real sandboxing.
parent
3fff5983
Changes
4
Hide whitespace changes
Inline
Side-by-side
www/aptui/instantiate.ajax
View file @
81717fed
...
...
@@ -136,8 +136,8 @@ function Do_Instantiate()
$args
[
"username"
]
=
$this_user
->
uid
();
$args
[
"email"
]
=
$this_user
->
email
();
$args
[
"profile"
]
=
$profile
->
uuid
();
# Guest
/Geni
users not allowed to provide rspec
if
(
isset
(
$this_user
)
&&
!
$this_user
->
IsNonLocal
()
&&
# Guest users not allowed to provide rspec
if
(
isset
(
$this_user
)
&&
array_key_exists
(
"rspec"
,
$ajax_args
))
{
$args
[
"rspec"
]
=
$ajax_args
[
"rspec"
];
}
...
...
www/aptui/instantiate.php
View file @
81717fed
...
...
@@ -244,8 +244,7 @@ function SPITFORM($formfields, $newuser, $errors)
$registered
=
(
isset
(
$this_user
)
?
"true"
:
"false"
);
$webonly
=
(
isset
(
$this_user
)
&&
$this_user
->
webonly
()
?
"true"
:
"false"
);
$nopprspec
=
(
!
isset
(
$this_user
)
||
$this_user
->
IsNonLocal
()
?
"true"
:
"false"
);
$nopprspec
=
(
!
isset
(
$this_user
)
?
"true"
:
"false"
);
$portal
=
""
;
# Gack.
if
(
isset
(
$this_user
)
&&
$this_user
->
IsNonLocal
())
{
...
...
@@ -813,11 +812,10 @@ else {
$errors
[
"profile"
]
=
"No such profile in the database"
;
}
#
# Real users are allowed to use Paramterized Profiles, which means
# Real
/Geni
users are allowed to use Paramterized Profiles, which means
# we could get an rspec.
#
if
(
$temp
->
isParameterized
()
&&
$this_user
&&
!
$this_user
->
IsNonLocal
()
&&
if
(
$temp
->
isParameterized
()
&&
$this_user
&&
isset
(
$formfields
[
"pp_rspec"
])
&&
$formfields
[
"pp_rspec"
]
!=
""
)
{
$args
[
"rspec"
]
=
$formfields
[
"pp_rspec"
];
}
...
...
www/aptui/manage_profile.ajax
View file @
81717fed
...
...
@@ -304,16 +304,6 @@ function Do_CheckScript()
$this_idx
=
$this_user
->
uid_idx
();
$this_uid
=
$this_user
->
uid
();
#
# Only local users for now, not users whose accounts were created
# by geni-login. Not until we have proper sandboxing while running
# the geni-lib code.
#
if
(
$this_user
->
IsNonLocal
())
{
SPITAJAX_ERROR
(
1
,
"You are not allowed to use geni-lib scripts."
);
return
;
}
if
(
!
isset
(
$ajax_args
[
"script"
]))
{
SPITAJAX_ERROR
(
1
,
"Missing script"
);
return
;
...
...
www/aptui/manage_profile.php
View file @
81717fed
...
...
@@ -451,17 +451,6 @@ else {
}
}
#
# Only local users for now, not users whose accounts were created
# by geni-login. Not until we have proper sandboxing while running
# the geni-lib code.
#
if
(
$this_user
->
IsNonLocal
()
&&
isset
(
$formfields
[
"profile_script"
])
&&
$formfields
[
"profile_script"
]
!=
""
)
{
$errors
[
"error"
]
=
"You are not allowed to use geni-lib scripts."
;
}
#
# Sanity check the snapuuid argument.
#
...
...
Write
Preview
Supports
Markdown
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