- Timestamp:
- 10/05/12 14:04:00 (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r410 r411 2823 2823 2824 2824 my $resultmsg = ''; 2825 2826 # Munge in some alternate state values 2827 $state = 1 if $state =~ /^active$/; 2828 $state = 1 if $state =~ /^on$/; 2829 $state = 0 if $state =~ /^inactive$/; 2830 $state = 0 if $state =~ /^off$/; 2825 2831 2826 2832 # Allow transactions, and raise an exception on errors so we can catch it later. -
trunk/dns-rpc.cgi
r409 r411 244 244 die "Missing UID\n" if !$args{uid}; 245 245 246 # not sure how to usefully represent permissions from any further out from DNSDB.pm :/247 # not to mention, permissions are checked at the UI layer, not the DB layer.248 my $perms = {domain_edit => 1, domain_create => 1, domain_delete => 1,249 record_edit => 1, record_create => 1, record_delete => 1250 };251 246 # bend and twist; get those arguments in in the right order! 247 $args{type} = 'u' if !$args{type}; 252 248 my @userargs = ($args{uid}, $args{username}, $args{group}, $args{pass}, $args{state}, $args{type}); 253 249 for my $argname ('fname','lname','phone') { … … 257 253 ##fixme: also underlying in DNSDB::updateUser(): no way to just update this or that attribute; 258 254 # have to pass them all in to be overwritten 259 my ($code,$msg) = DNSDB:: addUser($dbh, @userargs);255 my ($code,$msg) = DNSDB::updateUser($dbh, @userargs); 260 256 die $msg if $code eq 'FAIL'; 261 257 }
Note:
See TracChangeset
for help on using the changeset viewer.