Commit 7518bc4f authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fix; do not check permission when -f given, since it

indicates we are operating in the user context.

In general, the permission checks in snmpit is really a mechanism to
prevent mistakes on the command line.
parent c1591d30
......@@ -485,7 +485,8 @@ if ($pid && $eid) {
if (!defined($experiment)) {
die "There is no experiment $eid in project $pid\n";
if (defined($this_user) &&
# XXX Do not make this check when -f is used; called in user context.
if (defined($this_user) && !$opt{f} &&
!$experiment->AccessCheck($this_user, TB_EXPT_MODIFY)) {
die "You do not have permission to modify experiment $pid/$eid\n";
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