Commit e4fe75cb authored by Gary Wong's avatar Gary Wong

Do not allow unprivileged users to expand approved reservations.

Closes #323.
parent 4323860c
......@@ -471,6 +471,14 @@ my $uid_idx = $target_user->uid_idx();
my $res;
if( defined( $modify_idx ) ) {
$res = Reservation->Lookup( $modify_idx );
if( !$admin && $res->approved() && ( $starttime < $res->start ||
$endtime > $res->end ||
$count > $res->nodes ) ) {
print STDERR "This reservation has already been approved; you\n";
print STDERR "may no longer expand it.\n";
exit( 1 );
}
$res->SetStart( $starttime );
$res->SetEnd( $endtime );
$res->SetNodes( $count );
......
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