Changeset 248
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r246 r248 1827 1827 my $dbh = shift; 1828 1828 my $defrec = shift; 1829 my $rev erc = shift;1829 my $revrec = shift; 1830 1830 1831 1831 my %soa = @_; 1832 1832 1833 1833 ##fixme: data validation: make sure {recid} is really the SOA for {parent} 1834 my $sql = "UPDATE "_rectable($defrec, $revrec)." SET host=?, val=?, ttl=? WHERE record_id=? AND type=6"; 1835 $sth = $dbh->prepare($sql); 1836 $sth->execute("$soa{contact}:$soa{prins}", "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", 1837 $soa{ttl}, $soa{recid}); 1834 my $sql = "UPDATE "._rectable($defrec, $revrec)." SET host=?, val=?, ttl=? WHERE record_id=? AND type=6"; 1835 $dbh->do($sql, undef, ("$soa{contact}:$soa{prins}", "$soa{refresh}:$soa{retry}:$soa{expire}:$soa{minttl}", 1836 $soa{ttl}, $soa{recid})); 1838 1837 1839 1838 } # end updateSOA() -
trunk/dns.cgi
r247 r248 493 493 $page->param(defrec => $webvar{defrec}); 494 494 showzone($webvar{defrec}, $webvar{revrec}, $webvar{id}); 495 if ($webvar{defrec} eq 'y') { 496 } else { 495 if ($webvar{defrec} eq 'n') { 497 496 # showzone('n',$webvar{id}); 498 497 ##fixme: permission for viewing logs? 499 498 ##fixme: determine which slice of the log we view (group, domain, revzone) 500 $page->param(logdom => 1); 499 if ($webvar{revrec} eq 'n') { 500 $page->param(logdom => 1); 501 } else { 502 $page->param(logrdns => 1); 503 } 501 504 } 502 505 … … 523 526 # security check - does the user have permission to access this entity? 524 527 if (!check_scope(id => $webvar{id}, type => 525 ($webvar{defrec} eq 'y' ? ($webvar{revrec eq 'y' ? 'defrevrec' : 'defrec') : 'record'))) {528 ($webvar{defrec} eq 'y' ? ($webvar{revrec} eq 'y' ? 'defrevrec' : 'defrec') : 'record'))) { 526 529 $page->param(perm_err => "You are not permitted to edit the requested record"); 527 530 goto DONEREC; … … 761 764 # id is domain/revzone/group id 762 765 if (!check_scope(id => $webvar{id}, type => 763 ($webvar{defrec} eq 'y' ? 'group' : ($webvar{revrec} eq 'y' ? 'revzone' : 'domain'))) {766 ($webvar{defrec} eq 'y' ? 'group' : ($webvar{revrec} eq 'y' ? 'revzone' : 'domain')))) { 764 767 changepage(page => 'domlist', errmsg => "You do not have permission to edit the ". 765 768 ($webvar{defrec} eq 'y' ? 'default ' : '')."SOA record for the requested ". … … 1597 1600 } 1598 1601 $page->param(logfor => 'domain '.domainName($dbh,$id)); 1602 } elsif ($webvar{ltype} && $webvar{ltype} eq 'rdns') { 1603 $sql .= "rdns_id=?"; 1604 $id = $webvar{id}; 1605 if (!check_scope(id => $id, type => 'revzone')) { 1606 $page->param(errmsg => "You are not permitted to view log entries for the requested reverse zone"); 1607 goto DONELOG; 1608 } 1609 $page->param(logfor => 'reverse zone '.revName($dbh,$id)); 1599 1610 } else { 1600 1611 # Default to listing curgroup log … … 1604 1615 # group log is always for the "current" group 1605 1616 } 1617 ##fixme: 1618 # - filtering 1619 # - show reverse zone column? 1620 # - pagination/limiting number of records - put newest-first so user 1621 # doesn't always need to go to the last page for recent activity? 1606 1622 my $sth = $dbh->prepare($sql); 1607 1623 $sth->execute($id); -
trunk/templates/reclist.tmpl
r235 r248 50 50 <td colspan="4">Records</td> 51 51 <TMPL_IF record_create> <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&revrec=<TMPL_VAR NAME=revrec>&recact=new">Add record</a></td></TMPL_IF> 52 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log&id=<TMPL_VAR NAME=id><TMPL_IF logdom>&ltype=dom</TMPL_IF> ">View log</a></td>52 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log&id=<TMPL_VAR NAME=id><TMPL_IF logdom>&ltype=dom</TMPL_IF><TMPL_IF logrdns>&ltype=rdns</TMPL_IF>">View log</a></td> 53 53 </tr> 54 54
Note:
See TracChangeset
for help on using the changeset viewer.