Skip to content
GitLab
Menu
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
bfa612ba
Commit
bfa612ba
authored
Mar 19, 2007
by
Mike Hibler
Browse files
Make permission checks consistent with linktest_control
parent
d90b5619
Changes
1
Show whitespace changes
Inline
Side-by-side
www/linktest.php3
View file @
bfa612ba
...
...
@@ -51,17 +51,20 @@ $linktest_pid = 0;
#
function
CHECKPAGEARGS
()
{
global
$this_user
,
$TB_EXPTSTATE_ACTIVE
,
$TB_EXPT_MODIFY
;
global
$TB_EXPTSTATE_ACTIVATING
,
$TB_EXPTSTATE_MODIFY_RESWAP
;
global
$pid
,
$eid
,
$experiment
;
global
$unix_gid
,
$linktest_level
,
$linktest_pid
;
$reqargs
=
RequiredPageArguments
(
"experiment"
,
PAGEARG_EXPERIMENT
);
if
(
!
$experiment
->
AccessCheck
(
$this_user
,
$TB_EXPT_MODIFY
))
{
USERERROR
(
"You do not have permission to
run
linktest "
.
USERERROR
(
"You do not have permission to
start/stop
linktest "
.
"on
$pid
/
$eid
!"
,
1
);
}
if
(
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVE
)
{
USERERROR
(
"Experiment
$eid
must be active to run linktest!"
,
1
);
if
(
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVE
&&
$experiment
->
state
()
!=
$TB_EXPTSTATE_ACTIVATING
&&
$experiment
->
state
()
!=
$TB_EXPTSTATE_MODIFY_RESWAP
)
{
USERERROR
(
"Experiment
$eid
must be active to start/stop linktest!"
,
1
);
}
$pid
=
$experiment
->
pid
();
$eid
=
$experiment
->
eid
();
...
...
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