Changeset 428 for trunk/dns.cgi
- Timestamp:
- 10/11/12 17:11:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r397 r428 1362 1362 # } 1363 1363 1364 if ($webvar{locact} eq 'new') {1365 # uuhhmm.... 1366 } elsif ($webvar{locact} eq 'add') {1364 $webvar{locact} = '' if !$webvar{locact}; 1365 1366 if ($webvar{locact} eq 'add') { 1367 1367 changepage(page => "loclist", errmsg => "You are not permitted to add locations/views", id => $webvar{parentid}) 1368 1368 unless ($permissions{admin} || $permissions{location_create}); … … 1430 1430 1431 1431 show_msgs(); 1432 } 1433 1434 } elsif ($webvar{page} eq 'delloc') { 1435 1436 changepage(page=> "loclist", errmsg => "You are not allowed to delete locations") 1437 unless $permissions{admin} || $permissions{location_delete}; 1438 1439 # security check - does the user have permission to access this entity? 1440 # if (!check_scope(id => $webvar{id}, type => 'loc')) { 1441 # changepage(page => "loclist", errmsg => "You are not permitted to <foo> the requested location/view"); 1442 # } 1443 1444 $page->param(locid => $webvar{locid}); 1445 my $locdata = getLoc($dbh, $webvar{locid}); 1446 $locdata->{description} = $webvar{locid} if !$locdata->{description}; 1447 # first pass = confirm y/n (sorta) 1448 if (!defined($webvar{del})) { 1449 $page->param(del_getconf => 1); 1450 $page->param(location => $locdata->{description}); 1451 } elsif ($webvar{del} eq 'ok') { 1452 my ($code,$msg) = delLoc($dbh, $webvar{locid}); 1453 if ($code eq 'OK') { 1454 # success. go back to the user list, do not pass "GO" 1455 changepage(page => "loclist", resultmsg => $msg); 1456 } else { 1457 changepage(page => "loclist", errmsg => $msg); 1458 } 1459 } else { 1460 # cancelled. whee! 1461 changepage(page => "loclist"); 1432 1462 } 1433 1463
Note:
See TracChangeset
for help on using the changeset viewer.