Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
5ac5c4ad
Commit
5ac5c4ad
authored
Aug 26, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send project approval email from cloudlab-ops or aptlab-ops, for
cloudlab/aptlab generated projects.
parent
a2c2d060
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
20 deletions
+32
-20
www/approveproject.php3
www/approveproject.php3
+16
-10
www/aptui/signup.php
www/aptui/signup.php
+4
-4
www/defs.php3.in
www/defs.php3.in
+10
-4
www/resendapproval.php
www/resendapproval.php
+2
-2
No files found.
www/approveproject.php3
View file @
5ac5c4ad
<?php
<?php
#
#
# Copyright (c) 2000-201
2
University of Utah and the Flux Group.
# Copyright (c) 2000-201
4
University of Utah and the Flux Group.
#
#
# {{{EMULAB-LICENSE
# {{{EMULAB-LICENSE
#
#
...
@@ -124,6 +124,15 @@ if (! $this_project->IsMember($leader, $ignore)) {
...
@@ -124,6 +124,15 @@ if (! $this_project->IsMember($leader, $ignore)) {
USERERROR
(
"User
$headuid
is not the leader of project
$pid
."
,
1
);
USERERROR
(
"User
$headuid
is not the leader of project
$pid
."
,
1
);
}
}
# For email below
$APPROVAL_MAIL
=
$TBMAIL_APPROVAL
;
if
(
$this_project
->
isAPT
())
{
$APPROVAL_MAIL
=
"aptlab-approval@aptlab.net"
;
}
elseif
(
$this_project
->
isCloud
())
{
$APPROVAL_MAIL
=
"cloudlab-approval@cloudlab.us"
;
}
#
#
# Well, looks like everything is okay. Change the project approval
# Well, looks like everything is okay. Change the project approval
# value appropriately.
# value appropriately.
...
@@ -164,7 +173,7 @@ if ($approval == "postpone") {
...
@@ -164,7 +173,7 @@ if ($approval == "postpone") {
}
}
elseif
(
strcmp
(
$approval
,
"moreinfo"
)
==
0
)
{
elseif
(
strcmp
(
$approval
,
"moreinfo"
)
==
0
)
{
SendProjAdminMail
SendProjAdminMail
(
$
pid
,
"ADMIN"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
(
$
this_project
,
"ADMIN"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
"Project '
$pid
' Approval Postponed"
,
"Project '
$pid
' Approval Postponed"
,
"
\n
"
.
"
\n
"
.
"This message is to notify you that your project application
\n
"
.
"This message is to notify you that your project application
\n
"
.
...
@@ -173,8 +182,7 @@ elseif (strcmp($approval, "moreinfo") == 0) {
...
@@ -173,8 +182,7 @@ elseif (strcmp($approval, "moreinfo") == 0) {
"to provide that information or report your actions.
\n
"
.
"to provide that information or report your actions.
\n
"
.
"
\n
$message
"
.
"
\n
$message
"
.
"
\n\n
"
.
"
\n\n
"
.
"Thanks,
\n
"
.
"Thanks!
\n
"
);
"Testbed Operations
\n
"
);
echo
"<p><h3>
echo
"<p><h3>
Project approval for project
$pid
(User:
$headuid
) was
Project approval for project
$pid
(User:
$headuid
) was
...
@@ -235,9 +243,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
...
@@ -235,9 +243,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
"This message is to notify you that your account has
\n
"
.
"This message is to notify you that your account has
\n
"
.
"been terminated because your project
$pid
was denied.
\n
"
.
"been terminated because your project
$pid
was denied.
\n
"
.
"
\n\n
"
.
"
\n\n
"
.
"Thanks,
\n
"
.
"Thanks
\n
"
,
"Testbed Operations
\n
"
,
"From:
$APPROVAL_MAIL
\n
"
.
"From:
$TBMAIL_APPROVAL
\n
"
.
"Bcc:
$TBMAIL_APPROVAL
\n
"
.
"Bcc:
$TBMAIL_APPROVAL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
"Errors-To:
$TBMAIL_WWW
"
);
}
}
...
@@ -265,9 +272,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
...
@@ -265,9 +272,8 @@ elseif ((strcmp($approval, "deny") == 0) ||
"for
$pid
has been denied.
\n
"
.
"for
$pid
has been denied.
\n
"
.
"
\n
$message
"
.
"
\n
$message
"
.
"
\n\n
"
.
"
\n\n
"
.
"Thanks,
\n
"
.
"Thanks
\n
"
,
"Testbed Operations
\n
"
,
"From:
$APPROVAL_MAIL
\n
"
.
"From:
$TBMAIL_APPROVAL
\n
"
.
"Bcc:
$TBMAIL_APPROVAL
\n
"
.
"Bcc:
$TBMAIL_APPROVAL
\n
"
.
"Errors-To:
$TBMAIL_WWW
"
);
"Errors-To:
$TBMAIL_WWW
"
);
}
}
...
...
www/aptui/signup.php
View file @
5ac5c4ad
...
@@ -341,7 +341,7 @@ if (!$this_user) {
...
@@ -341,7 +341,7 @@ if (!$this_user) {
$args
[
"affiliation"
]
=
$formfields
[
"affiliation"
];
$args
[
"affiliation"
]
=
$formfields
[
"affiliation"
];
$args
[
"password"
]
=
$formfields
[
"password1"
];
$args
[
"password"
]
=
$formfields
[
"password1"
];
# Flag to the backend.
# Flag to the backend.
$args
[
"
viaAPT"
]
=
1
;
$args
[
"
genesis"
]
=
(
$ISAPT
?
"aptlab"
:
"cloudlab"
)
;
#
#
# Backend verifies pubkey and returns error. We first look for a
# Backend verifies pubkey and returns error. We first look for a
...
@@ -427,14 +427,14 @@ $args["linkedtous"] = 1;
...
@@ -427,14 +427,14 @@ $args["linkedtous"] = 1;
$args
[
"plab"
]
=
0
;
$args
[
"plab"
]
=
0
;
$args
[
"ron"
]
=
0
;
$args
[
"ron"
]
=
0
;
$args
[
"funders"
]
=
"None"
;
$args
[
"funders"
]
=
"None"
;
$args
[
"whynotpublic"
]
=
"APT"
;
$args
[
"whynotpublic"
]
=
(
$ISAPT
?
"aptlab"
:
"cloudlab"
)
;
# Flag to the backend.
# Flag to the backend.
$args
[
"
viaAPT"
]
=
1
;
$args
[
"
genesis"
]
=
(
$ISAPT
?
"aptlab"
:
"cloudlab"
)
;
if
(
!
(
$project
=
Project
::
NewNewProject
(
$args
,
$error
)))
{
if
(
!
(
$project
=
Project
::
NewNewProject
(
$args
,
$error
)))
{
$errors
[
"error"
]
=
$error
;
$errors
[
"error"
]
=
$error
;
if
(
$suexec_retval
<
0
)
{
if
(
$suexec_retval
<
0
)
{
TBERROR
(
"Error Creating APT Project
\n
${error}
\n\n
"
.
TBERROR
(
"Error Creating APT
/CloudLab
Project
\n
${error}
\n\n
"
.
print_r
(
$args
,
TRUE
),
0
);
print_r
(
$args
,
TRUE
),
0
);
}
}
SPITFORM
(
$formfields
,
0
,
$errors
);
SPITFORM
(
$formfields
,
0
,
$errors
);
...
...
www/defs.php3.in
View file @
5ac5c4ad
...
@@ -244,11 +244,17 @@ function TBMAIL($to, $subject, $message, $headers = 0)
...
@@ -244,11 +244,17 @@ function TBMAIL($to, $subject, $message, $headers = 0)
# Identical to perl function of the same name
# Identical to perl function of the same name
#
#
#
#
function
SendProjAdminMail
(
$proj
,
$from
,
$to
,
$subject
,
$message
,
$headers
=
""
)
function
SendProjAdminMail
(
$project
,
$from
,
$to
,
$subject
,
$message
,
$headers
=
""
)
{
{
global
$MAILMANSUPPORT
,
$TBMAIL_APPROVAL
,
$TBMAIL_AUDIT
,
$OURDOMAIN
,
$TBMAIL_WWW
;
global
$MAILMANSUPPORT
,
$TBMAIL_APPROVAL
,
$TBMAIL_AUDIT
;
$projadminmail
=
0
&&
$MAILMANSUPPORT
?
global
$OURDOMAIN
,
$TBMAIL_WWW
;
"
$proj
-admin@
$OURDOMAIN
"
:
$TBMAIL_APPROVAL
;
$pid
=
$project
->
pid
();
$projadminmail
=
(
$project
->
isAPT
()
?
"aptlab-approval@aptlab.net"
:
$project
->
isCloud
()
?
"cloudlab-approval@cloudlab.us"
:
$TBMAIL_APPROVAL
);
if
(
$headers
)
{
if
(
$headers
)
{
$headers
.
=
"
\n
"
;
$headers
.
=
"
\n
"
;
}
}
...
...
www/resendapproval.php
View file @
5ac5c4ad
<?php
<?php
#
#
# Copyright (c) 2003-201
2
University of Utah and the Flux Group.
# Copyright (c) 2003-201
4
University of Utah and the Flux Group.
#
#
# {{{EMULAB-LICENSE
# {{{EMULAB-LICENSE
#
#
...
@@ -128,7 +128,7 @@ $headuid_email = $leader->email();
...
@@ -128,7 +128,7 @@ $headuid_email = $leader->email();
$headname
=
$leader
->
name
();
$headname
=
$leader
->
name
();
SendProjAdminMail
(
SendProjAdminMail
(
$p
id
,
$p
roject
,
"ADMIN"
,
"ADMIN"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
"
$headname
'
$headuid
' <
$headuid_email
>"
,
"Project '
$pid
' Approval"
,
"Project '
$pid
' Approval"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment