Commit 529ae1ba authored by Leigh Stoller's avatar Leigh Stoller

Couple of bug fixes for single project users, and one aggregate list.

parent 54593f6b
......@@ -80,6 +80,12 @@ if ($ISAPT && !$this_user) {
}
if ($this_user) {
$projlist = $this_user->ProjectAccessList($TB_PROJECT_CREATEEXPT);
if (count($projlist) == 0) {
SPITUSERERROR("You do not belong to any projects with permission to ".
"create new experiments. Please contact your project ".
"leader to grant you the neccessary privilege.");
exit();
}
}
if ($ISCLOUD) {
$profile_default = "ARM64OpenStack";
......@@ -582,7 +588,8 @@ function SPITFORM($formfields, $newuser, $errors)
echo "<div id='editmodal_div'></div>\n";
SpitOopsModal("oops");
if (isset($this_user) && ($ISCLOUD || ISADMIN() || STUDLY())) {
if (isset($this_user) && !$this_user->webonly() &&
($ISCLOUD || ISADMIN() || STUDLY())) {
echo "<script type='text/plain' id='amlist-json'>\n";
echo htmlentities(json_encode($amlist));
echo "</script>\n";
......
......@@ -128,8 +128,6 @@ function(_, sup, JacksEditor, ppmodalString, ppbodyString, chooserString)
// Instantiate the new rspec on the chosen aggregate.
function Instantiate(where)
{
console.log(where);
if (callback_done) {
callback_done(RSPEC, where);
return;
......@@ -159,6 +157,7 @@ function(_, sup, JacksEditor, ppmodalString, ppbodyString, chooserString)
{
if (!amlist || amlist.length == 1) {
Instantiate(amdefault);
return;
}
var html = chooseTemplate({
amlist : amlist,
......
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