Commit 81717fed authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Allow Geni users to create and instantiate geni-lib scripts,

now that we have real sandboxing.
parent 3fff5983
......@@ -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"];
}
......
......@@ -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"];
}
......
......@@ -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;
......
......@@ -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.
#
......
Supports Markdown
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