Changeset 260 for trunk/dns.cgi
- Timestamp:
- 03/02/12 17:51:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r259 r260 426 426 $page->param(curpage => $webvar{page}); 427 427 listzones(); 428 429 } elsif ($webvar{page} eq 'newrevzone') { 430 431 ## scope/access check - use domain settings? invent new (bleh) 432 changepage(page => "revzones", errmsg => "You are not permitted to add reverse zones") 433 unless ($permissions{admin} || $permissions{domain_create}); 434 435 fill_grouplist("grouplist"); 436 437 if ($webvar{add_failed}) { 438 $page->param(add_failed => 1); 439 $page->param(errmsg => $webvar{errmsg}); 440 $page->param(revzone => $webvar{revzone}); 441 $page->param(revpatt => $webvar{revpatt}); 442 } 443 444 } elsif ($webvar{page} eq 'addrevzone') { 445 446 changepage(page => "revzones", errmsg => "You are not permitted to add reverse zones") 447 unless ($permissions{admin} || $permissions{domain_create}); 448 449 # security check - does the user have permission to access this entity? 450 if (!check_scope(id => $webvar{group}, type => 'group')) { 451 changepage(page => "newrevzone", add_failed => 1, revzone => $webvar{revzone}, revpatt => $webvar{revpatt}, 452 errmsg => "You do not have permission to add a reverse zone to the requested group"); 453 } 454 455 my ($code,$msg) = addRDNS($dbh, $webvar{revzone}, $webvar{revpatt}, $webvar{group}, 456 ($webvar{makeactive} eq 'on' ? 1 : 0), 457 (username => $session->param("username"), id => $session->param("uid")) ); 458 459 if ($code eq 'OK') { 460 logaction(0, $session->param("username"), $webvar{group}, "Added reverse zone $webvar{revzone}", $msg); 461 changepage(page => "reclist", id => $msg, revrec => 'y'); 462 } else { 463 logaction(0, $session->param("username"), $webvar{group}, "Failed adding reverse zone $webvar{revzone} ($msg)"); 464 changepage(page => "newrevzone", add_failed => 1, revzone => $webvar{revzone}, revpatt => $webvar{revpatt}, 465 errmsg => $msg); 466 } 467 468 #} elsif ($webvar{page} eq 'delrevzone') { 428 469 429 470 } elsif ($webvar{page} eq 'reclist') {
Note:
See TracChangeset
for help on using the changeset viewer.