Changeset 820 for trunk/cgi-bin/main.cgi


Ignore:
Timestamp:
03/11/16 15:14:08 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Add "delete VRF" confirmation and action pages. Refine link from showvrf
template since a VRF is a completely different type of entity than a
netblock. See #54.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r818 r820  
    148148
    149149  } # ACL check
     150
     151} elsif ($webvar{action} eq 'delvrf') {
     152  if ($IPDBacl{$authuser} !~ /s/) {
     153    $aclerr = 'delvrf';
     154  }
     155
     156  my $vrf = getVRF($ip_dbh, $webvar{vrf});
     157
     158  $page->param(vrf => $webvar{vrf});
     159  $page->param(vrfcomment => $vrf->{comment});
     160
     161} elsif ($webvar{action} eq 'finaldelvrf') {
     162  if ($IPDBacl{$authuser} !~ /s/) {
     163    $aclerr = 'finaldelvrf';
     164  }
     165
     166  my $vrf = getVRF($ip_dbh, $webvar{vrf});
     167  $page->param(vrf => $webvar{vrf});
     168  $page->param(vrfcomment => $vrf->{comment});
     169
     170  my ($code,$msg) = deleteVRF($ip_dbh, $webvar{vrf}, $authuser);
     171
     172  if ($code eq 'FAIL') {
     173    $page->param(failmsg => $msg);
     174  }
    150175
    151176} elsif ($webvar{action} eq 'addmaster') {
Note: See TracChangeset for help on using the changeset viewer.