Changeset 469
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r467 r469 1466 1466 1467 1467 ## DNSDB::initRPC() 1468 # Takes a database handle, remote username,and remote fullname.1468 # Takes a remote username and remote fullname. 1469 1469 # Sets up the RPC logging-pseudouser if needed. 1470 1470 # Sets the %userdata hash for logging. 1471 1471 # Returns undef on failure 1472 1472 sub initRPC { 1473 my $dbh = shift; 1473 my $self = shift; 1474 my $dbh = $self->{dbh}; 1474 1475 my %args = @_; 1475 1476 … … 1500 1501 # Returns undef otherwise 1501 1502 sub login { 1502 my $dbh = shift; 1503 my $self = shift; 1504 my $dbh = $self->{dbh}; 1503 1505 my $user = shift; 1504 1506 my $pass = shift; … … 1534 1536 # See https://secure.deepnet.cx/trac/dnsadmin/ticket/21 1535 1537 sub initActionLog { 1536 my $dbh = shift; 1538 my $self = shift; 1539 my $dbh = $self->{dbh}; 1537 1540 my $uid = shift; 1538 1541 … … 1562 1565 # Takes database handle and UID 1563 1566 sub initPermissions { 1564 my $dbh = shift; 1567 my $self = shift; 1568 my $dbh = $self->{dbh}; 1565 1569 my $uid = shift; 1566 1570 1567 # %permissions = $(getPermissions( $dbh,'user',$uid));1568 getPermissions($dbh,'user', $uid, \%permissions);1571 # %permissions = $(getPermissions('user',$uid)); 1572 $self->getPermissions('user', $uid, \%permissions); 1569 1573 1570 1574 } # end initPermissions() … … 1575 1579 # Requires DB handle, group or user flag, ID, and hashref. 1576 1580 sub getPermissions { 1577 my $dbh = shift; 1581 my $self = shift; 1582 my $dbh = $self->{dbh}; 1583 1578 1584 my $type = shift; 1579 1585 my $id = shift; -
trunk/dns.cgi
r468 r469 312 312 my $flag = 0; 313 313 foreach (@viewablegroups) { 314 $flag = 1 if isParent($dbh, $_, 'group', $webvar{id}, 'domain');314 $flag = 1 if $dnsdb->isParent(, $_, 'group', $webvar{id}, 'domain'); 315 315 } 316 316 if ($flag && ($permissions{admin} || $permissions{domain_edit})) { … … 416 416 my $flag = 0; 417 417 foreach (@viewablegroups) { 418 $flag = 1 if isParent($dbh, $_, 'group', $webvar{id}, 'revzone');418 $flag = 1 if $dnsdb->isParent(, $_, 'group', $webvar{id}, 'revzone'); 419 419 } 420 420 if ($flag && ($permissions{admin} || $permissions{domain_edit})) { … … 1092 1092 my $flag = 0; 1093 1093 foreach (@viewablegroups) { 1094 $flag = 1 if isParent($dbh, $_, 'group', $webvar{id}, 'user');1094 $flag = 1 if $dnsdb->isParent(, $_, 'group', $webvar{id}, 'user'); 1095 1095 } 1096 1096 if ($flag && ($permissions{admin} || $permissions{user_edit} || … … 1775 1775 $row{whereami} = $uri_self; 1776 1776 $row{curgrp} = ($_ == $cur); 1777 $row{expanded} = isParent($dbh, $_, 'group', $cur, 'group');1777 $row{expanded} = $dnsdb->isParent(, $_, 'group', $cur, 'group'); 1778 1778 $row{expanded} = 1 if $_ == $cur; 1779 1779 $row{subs} = fill_grptree($_,$cur,$indent.' '); … … 2337 2337 } else { 2338 2338 foreach (@viewablegroups) { 2339 return 1 if isParent($dbh, $_, 'group', $entity, $entype);2339 return 1 if $dnsdb->isParent(, $_, 'group', $entity, $entype); 2340 2340 } 2341 2341 }
Note:
See TracChangeset
for help on using the changeset viewer.