Commit f3808de6 authored by Leigh Stoller's avatar Leigh Stoller

Add a silent option (and kill Annihilate). Silent means not to send email.

parent 3de3c9b5
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003, 2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2003, 2005, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -131,11 +131,15 @@ elseif (strcmp($approval, "moreinfo") == 0) {
</h3>\n";
}
elseif ((strcmp($approval, "deny") == 0) ||
(strcmp($approval, "annihilate") == 0) ||
(strcmp($approval, "destroy") == 0)) {
SUEXEC($uid, $TBADMINGROUP, "rmproj $pid", 1);
$sendemail = 1;
if (isset($silent) && $silent == "Yep") {
$sendemail = 0;
}
if (strcmp($approval, "annihilate")) {
if ($sendemail) {
TBMAIL("$headname '$headuid' <$headuid_email>",
"Project '$pid' Denied",
"\n".
......@@ -153,11 +157,10 @@ elseif ((strcmp($approval, "deny") == 0) ||
#
# Well, if the "destroy" option was given, kill the users account.
#
if ((strcmp($approval, "annihilate") == 0) ||
(strcmp($approval, "destroy") == 0)) {
if ($approval == "destroy") {
SUEXEC($uid, $TBADMINGROUP, "webrmuser $headuid", 1);
if (strcmp($approval, "annihilate")) {
if ($sendemail) {
TBMAIL("$headname '$headuid' <$headuid_email>",
"Account '$headuid' Terminated",
"\n".
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003, 2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2003, 2005, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -42,42 +42,35 @@ if (! TBValidProject($pid)) {
}
echo "<center><h3>You have the following choices:</h3></center>
<table align=center border=0>
<table class=stealth align=center border=0>
<tr>
<td>Deny</td>
<td>-</td>
<td>Deny project application (kills project records)</td>
<td class=stealth>Deny</td>
<td class=stealth>-</td>
<td class=stealth>Deny project application (kills project records)</td>
</tr>
<tr>
<td>Destroy</td>
<td>-</td>
<td>Deny project application, and kill the user account</td>
<td class=stealth>Destroy</td>
<td class=stealth>-</td>
<td class=stealth>Deny project application, and kill the user account</td>
</tr>
<tr>
<td>Annihilate</td>
<td>-</td>
<td>Deny project application silently,
and kill the user account silently</td>
<td class=stealth>Approve</td>
<td class=stealth>-</td>
<td class=stealth>Approve the project</td>
</tr>
<tr>
<td>Approve</td>
<td>-</td>
<td>Approve the project</td>
<td class=stealth>More Info</td>
<td class=stealth>-</td>
<td class=stealth>Ask for more info</td>
</tr>
<tr>
<td>More Info</td>
<td>-</td>
<td>Ask for more info</td>
</tr>
<tr>
<td>Postpone</td>
<td>-</td>
<td>Twiddle your thumbs some more</td>
<td class=stealth>Postpone</td>
<td class=stealth>-</td>
<td class=stealth>Twiddle your thumbs some more</td>
</tr>
</table>\n";
......@@ -126,7 +119,6 @@ echo "
<option value='moreinfo'>More Info</option>
<option value='deny'>Deny</option>
<option value='destroy'>Destroy</option>
<option value='annihilate'>Annihilate</option>
</select>";
if (!$approvable) {
echo " <br><b>WARNING:</b> Project cannot be approved,";
......@@ -136,6 +128,13 @@ echo "
</td>
</tr>\n";
echo "<tr>
<td align=center>
<input type=checkbox value=Yep
name=silent>Silent (no email sent for deny,destroy)
</td>
</tr>\n";
#
# Allow the approver to change the project's head UID - gotta find everyone in
# the default group, first
......
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