Commit 55712c70 authored by Russ Fish's avatar Russ Fish

Remove redundant code path under newproject in Emulab initialization.

It sets project_root trust for the project leader on the default group
of the project.  approveproject will eventually call mkproj, and that
calls modgroups to add the project leader trust.
parent cdcb91aa
......@@ -403,7 +403,7 @@ class Group
#
# This is strictly for initialization of a testbed.
#
function Initialize($uid, $pid) {
function Initialize($uid) {
global $TBOPSPID;
$emulabgroup = Group::LookupByPidGid($TBOPSPID, $TBOPSPID);
......@@ -427,11 +427,6 @@ class Group
DBQueryFatal("update group_membership set date_approved=now(), ".
" trust='" . TBDB_TRUSTSTRING_GROUPROOT . "' ".
"where uid='$uid' and pid='$TBOPSPID'");
DBQueryFatal("update group_membership set date_approved=now(), ".
" trust='" . TBDB_TRUSTSTRING_PROJROOT . "' ".
"where uid='$uid' and pid='$pid'");
return 0;
}
......
......@@ -984,12 +984,13 @@ if (! ($project = Project::NewNewProject($leader, $args, $error))) {
# Need to do some extra work for the first project; eventually move to backend
#
if ($FirstInitState) {
$pid = $formfields["pid"];
Group::Initialize($proj_head_uid, $pid);
# Set up the management group (emulab-ops).
Group::Initialize($proj_head_uid);
#
# Move to next phase.
#
$pid = $formfields["pid"];
TBSetFirstInitPid($pid);
TBSetFirstInitState("approveproject");
header("Location: approveproject.php3?pid=$pid&approval=approve");
......
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