From c2ca6dbc6caa51283a8fa587a622bcd870c97d93 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 7 Dec 2007 00:51:07 +0000 Subject: 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. --- perl/Wallet/Server.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl') 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 ($@) { -- cgit v1.2.3