diff options
| author | Russ Allbery <rra@stanford.edu> | 2007-08-29 04:50:51 +0000 | 
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2007-08-29 04:50:51 +0000 | 
| commit | 30f98a097556fa36a0d485cc6db8dc6cb3e9043d (patch) | |
| tree | 8516b243ccf02a4c7462c3f3e1b979b8a01a8934 /perl/Wallet/Object | |
| parent | ecafbc3bfd349d2a5a8e785e5c1161f428142533 (diff) | |
Show ACL names instead of IDs when displaying objects.
Diffstat (limited to 'perl/Wallet/Object')
| -rw-r--r-- | perl/Wallet/Object/Base.pm | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/perl/Wallet/Object/Base.pm b/perl/Wallet/Object/Base.pm index 0980aed..566dbfd 100644 --- a/perl/Wallet/Object/Base.pm +++ b/perl/Wallet/Object/Base.pm @@ -323,6 +323,12 @@ sub show {      my $output = '';      for (my $i = 0; $i < @data; $i++) {          next unless defined $data[$i]; +        if ($attrs[$i][0] =~ /^ob_acl_/) { +            my $acl = eval { Wallet::ACL->new ($data[$i], $self->{dbh}) }; +            if ($acl and not $@) { +                $data[$i] = $acl->name || $data[$i]; +            } +        }          $output .= sprintf ("%15s: %s\n", $attrs[$i][1], $data[$i]);      }      return $output; | 
