Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emulab-devel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Cecchet
emulab-devel
Commits
bfa612ba
Commit
bfa612ba
authored
18 years ago
by
Mike Hibler
Browse files
Options
Downloads
Patches
Plain Diff
Make permission checks consistent with linktest_control
parent
d90b5619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
www/linktest.php3
+6
-3
6 additions, 3 deletions
www/linktest.php3
with
6 additions
and
3 deletions
www/linktest.php3
+
6
−
3
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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment