Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
89c6471a
Commit
89c6471a
authored
Jun 06, 2002
by
Chad Barb
Browse files
Fixed admin check, and added "Content-disposition" to suggest a sane filename.
parent
fb900335
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/nodetipacl.php3
View file @
89c6471a
...
...
@@ -24,6 +24,7 @@ if (!isset($node_id) ||
# nodes in their own experiments.
#
# XXX is MODIFYINFO the correct one to check? (probably)
$isadmin
=
ISADMIN
(
$uid
);
if
(
!
$isadmin
)
{
if
(
!
TBNodeAccessCheck
(
$uid
,
$node_id
,
$TB_NODEACCESS_MODIFYINFO
))
{
USERERROR
(
"You do not have permission to tip to node
$node_id
!"
,
1
);
...
...
@@ -36,7 +37,11 @@ if (mysql_num_rows($query_result) == 0) {
USERERROR
(
"The node
$node_id
does not exist, or appear to have a tipline!"
,
1
);
}
header
(
"Content-type: text/testbed-acl"
);
$filename
=
$node_id
.
".acl"
;
header
(
"Content-Type: text/testbed-acl"
);
header
(
"Content-Disposition: attachment; filename=
$filename
;"
);
header
(
"Content-Description: an ACL file which will allow access to a testbed node serial port"
);
# XXX, should handle multiple tip lines gracefully somehow, but not important for now.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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