All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit a1be42da authored by Leigh B. Stoller's avatar Leigh B. Stoller

Change email list generation. Instead of adding when a user applies

(via join or start), add when the user/project is approved. Also move the
lists from /usr/testbed/www/mailists/foo.txt to /usr/testbed/lists/foo.list.
parent 0db1b771
......@@ -22,15 +22,6 @@ I could just figure out how to add a php mode to emacs ...
* Decouple root privs from begin experiment privs, as per Jay
request. Default on for begin experiment, default off for root.
* Fix the "revisit" problem. If you revisit the page after logging in, your
login is lost. The original index page I started with passed the uid along
with a URI parameter. If you click "reload" no problem cause it sends the
same URI to the page, which includes the uid (?stoller). But if you log
in, go someplace else, and then visit the page again, its lost and you
have to log in again. The simple fix is to add another cookie, or to
include the uid in the existing cookie (the one I added to send back the
hash key).
* Fix the email list problem. Right now we add people to the two
email list files in /usr/testbed/www/maillist when they apply. We should
either delay that until they are approved, or make sure they get taken
......
......@@ -212,6 +212,30 @@ elseif (strcmp($approval, "approve") == 0) {
"$newstatus.",
1);
}
#
# For new leaders, write their email addresses to files to be used for
# generating messages.
#
$fp = fopen($TBLIST_LEADERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_LEADERS to add new ".
"project leader email: $headuid_email\n", 0);
}
else {
fwrite($fp, "$headuid_email\n");
fclose($fp);
}
$fp = fopen($TBLIST_USERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_USERS to add new ".
"project leader email: $headuid_email\n", 0);
}
else {
fwrite($fp, "$headuid_email\n");
fclose($fp);
}
}
mail("$headuid_email",
......
......@@ -195,6 +195,19 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
TBERROR("Database Error changing $user status to $newstatus.",
1);
}
#
# Add to user email list.
#
$fp = fopen($TBLIST_USERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_USERS to add new ".
"project member email: $user_email\n", 0);
}
else {
fwrite($fp, "$user_email\n");
fclose($fp);
}
}
mail("$user_email",
......
......@@ -18,9 +18,9 @@ $TBWWW_DIR = "$TBDIR"."www/";
$TBBIN_DIR = "$TBDIR"."bin/";
$TBSUEXEC_PATH = "$TBBIN_DIR/suexec";
$TBLIST_DIR = "/usr/testbed/www/maillist";
$TBLIST_LEADERS = "$TBLIST_DIR"."/leaders.txt";
$TBLIST_USERS = "$TBLIST_DIR"."/users.txt";
$TBLIST_DIR = "/usr/testbed/lists";
$TBLIST_LEADERS = "$TBLIST_DIR"."/leaders.list";
$TBLIST_USERS = "$TBLIST_DIR"."/users.list";
$TBPROJ_DIR = "/proj";
$TBUSER_DIR = "/users/";
......
......@@ -264,34 +264,6 @@ mail($TBMAIL_APPROVAL,
"Cc: $TBMAIL_CONTROL\n".
"Errors-To: $TBMAIL_WWW");
#
# For new leaders, write their email addresses to files to be used for
# generating messages.
#
# Note, we should do this after the user comes back and does the
# verification step! This ensures we have a valid email address
# and the user really wants to use the testbed.
#
if (! $returning) {
$fp = fopen($TBLIST_LEADERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_LEADERS to add new project leader", 0);
}
else {
fwrite($fp, "$usr_email\n");
fclose($fp);
}
$fp = fopen($TBLIST_USERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_USERS to add new project leader", 0);
}
else {
fwrite($fp, "$usr_email\n");
fclose($fp);
}
}
#
# Now give the user some warm fuzzies
#
......
......@@ -138,20 +138,6 @@ if (! $returning) {
TBERROR("Database Error adding adding new user $uid: $err\n", 1);
}
#
# Note, we should do this after the user comes back and does the
# verification step! This ensures we have a valid email address
# and the user really wants to use the testbed.
#
$fp = fopen($TBLIST_USERS, "a");
if (! $fp) {
TBERROR("Could not open $TBLIST_USERS to add new project leader", 0);
}
else {
fwrite($fp, "$usr_email\n");
fclose($fp);
}
$key = GENKEY($uid);
mail("$usr_email", "TESTBED: Your New User Key",
......
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