diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:51:07 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-07 00:51:07 +0000 |
commit | c2ca6dbc6caa51283a8fa587a622bcd870c97d93 (patch) | |
tree | 47526cc3cc5ed78b52d128e1012aeb78f075112c /perl/Wallet/Server.pm | |
parent | 2e9f1bbdab7ee4cbf9fba8b5c99cb3e970f35f4b (diff) |
Check a default creation ACL first before the ADMIN ACL when deciding
whether we can auto-create a non-existent ACL, since creating one with
the ADMIN ACL doesn't create a useful object.
Allow @ in wallet-backend arguments so that principal names can be
passed in.
Diffstat (limited to 'perl/Wallet/Server.pm')
-rw-r--r-- | perl/Wallet/Server.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perl/Wallet/Server.pm b/perl/Wallet/Server.pm index f04c139..87a5bab 100644 --- a/perl/Wallet/Server.pm +++ b/perl/Wallet/Server.pm @@ -243,10 +243,9 @@ sub create { my $dbh = $self->{dbh}; my $user = $self->{user}; my $host = $self->{host}; - my $acl; - unless ($self->{admin}->check ($user)) { - $acl = $self->create_check ($type, $name); - return unless $acl; + my $acl = $self->create_check ($type, $name); + unless ($acl) { + return unless $self->{admin}->check ($user); } my $object = eval { $class->create ($type, $name, $dbh, $user, $host) }; if ($@) { |