Changeset 474
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r473 r474 1631 1631 # Takes a db handle, type, owner-id, and hashref for the changed permissions. 1632 1632 sub changePermissions { 1633 my $dbh = shift; 1633 my $self = shift; 1634 my $dbh = $self->{dbh}; 1634 1635 my $type = shift; 1635 1636 my $id = shift; -
trunk/dns.cgi
r473 r474 893 893 # fill default permissions with immediate parent's current ones 894 894 my %parperms; 895 getPermissions($dbh,'group', $curgroup, \%parperms);895 $dnsdb->getPermissions('group', $curgroup, \%parperms); 896 896 fill_permissions($page, \%parperms); 897 897 } … … 944 944 # extra safety check; make sure user can't construct a URL to bypass ACLs 945 945 my %curperms; 946 getPermissions($dbh,'group', $webvar{gid}, \%curperms);946 $dnsdb->getPermissions('group', $webvar{gid}, \%curperms); 947 947 my %chperms; 948 948 my $alterperms = 0; … … 963 963 } 964 964 } 965 my ($code,$msg) = changePermissions($dbh,'group', $webvar{gid}, \%chperms);965 my ($code,$msg) = $dnsdb->changePermissions('group', $webvar{gid}, \%chperms); 966 966 if ($code eq 'OK') { 967 967 if ($alterperms) { … … 980 980 $page->param(grpmeddle => $dnsdb->groupName($webvar{gid})); 981 981 my %grpperms; 982 getPermissions($dbh,'group', $webvar{gid}, \%grpperms);982 $dnsdb->getPermissions('group', $webvar{gid}, \%grpperms); 983 983 fill_permissions($page, \%grpperms); 984 984 … … 1124 1124 fill_clonemelist(); 1125 1125 my %grpperms; 1126 getPermissions($dbh,'group', $curgroup, \%grpperms);1126 $dnsdb->getPermissions('group', $curgroup, \%grpperms); 1127 1127 1128 1128 my $grppermlist = new HTML::Template(filename => "$templatedir/permlist.tmpl"); … … 1146 1146 1147 1147 my %newperms; # we're going to prefill the existing permissions, so we can change them. 1148 getPermissions($dbh,'user', $webvar{uid}, \%newperms);1148 $dnsdb->getPermissions('user', $webvar{uid}, \%newperms); 1149 1149 1150 1150 if ($webvar{pass1} ne $webvar{pass2}) { … … 1161 1161 if (!$permissions{admin}) { 1162 1162 my %grpperms; 1163 getPermissions($dbh,'group', $curgroup, \%grpperms);1163 $dnsdb->getPermissions('group', $curgroup, \%grpperms); 1164 1164 my $ret = comparePermissions(\%permissions, \%grpperms); 1165 1165 if ($ret eq '<' || $ret eq '!') { … … 1183 1183 } elsif ($permissions{admin} && $webvar{perms_type} eq 'clone') { 1184 1184 $permstring = "c:$webvar{clonesrc}"; 1185 getPermissions($dbh,'user', $webvar{clonesrc}, \%newperms);1185 $dnsdb->getPermissions('user', $webvar{clonesrc}, \%newperms); 1186 1186 $page->param(perm_clone => 1); 1187 1187 } else { … … 1219 1219 if ($code eq 'OK') { 1220 1220 $newperms{admin} = 1 if $webvar{accttype} eq 'S'; 1221 ($code2,$msg2) = changePermissions($dbh,'user', $webvar{uid}, \%newperms, ($permstring eq 'i'));1221 ($code2,$msg2) = $dnsdb->changePermissions('user', $webvar{uid}, \%newperms, ($permstring eq 'i')); 1222 1222 } 1223 1223 } … … 1281 1281 1282 1282 my %curperms; 1283 getPermissions($dbh,'user', $webvar{user}, \%curperms);1283 $dnsdb->getPermissions('user', $webvar{user}, \%curperms); 1284 1284 fill_permissions($page, \%curperms); 1285 1285
Note:
See TracChangeset
for help on using the changeset viewer.