diff options
Diffstat (limited to 'lib/Fripost/Schema')
-rw-r--r-- | lib/Fripost/Schema/Alias.pm | 2 | ||||
-rw-r--r-- | lib/Fripost/Schema/List.pm | 4 | ||||
-rw-r--r-- | lib/Fripost/Schema/Local.pm | 2 | ||||
-rw-r--r-- | lib/Fripost/Schema/Mailbox.pm | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/lib/Fripost/Schema/Alias.pm b/lib/Fripost/Schema/Alias.pm index 07ae84f..51bf98f 100644 --- a/lib/Fripost/Schema/Alias.pm +++ b/lib/Fripost/Schema/Alias.pm @@ -111,8 +111,8 @@ sub add { } eval { + die "Missing alias name\n" unless $a->{alias} =~ /^.+\@.+$/; my ($l,$d) = split /\@/, email_to_ascii($a->{alias}), 2; - die "Missing alias name\n" if $l eq ''; &_is_valid($a); die "‘".$a->{alias}."’ already exists\n" if $self->local->exists($a->{alias},%options); diff --git a/lib/Fripost/Schema/List.pm b/lib/Fripost/Schema/List.pm index 87876f6..67da859 100644 --- a/lib/Fripost/Schema/List.pm +++ b/lib/Fripost/Schema/List.pm @@ -51,6 +51,7 @@ sub search { deref => 'never', filter => $filter, attrs => [ qw/fvl description fripostIsStatusActive + fripostIsStatusPending fripostListManager/ ] ); if ($lists->code) { @@ -61,6 +62,7 @@ sub search { , isactive => $_->get_value('fripostIsStatusActive') eq 'TRUE' , description => concat($concat, $_->get_value('description')) , transport => $_->get_value('fripostListManager') + , ispending => ($_->get_value('fripostIsStatusPending') // '') eq 'TRUE' } } $lists->sorted('fvl') @@ -113,8 +115,8 @@ sub add { eval { + die "Missing list name\n" unless $l->{list} =~ /^.+\@.+$/; my ($l2,$d) = split /\@/, email_to_ascii($l->{list}), 2; - die "Missing list name\n" if $l eq ''; must_attrs( $l, 'transport' ); &_is_valid($l); die "‘".$l->{list}."’ already exists\n" diff --git a/lib/Fripost/Schema/Local.pm b/lib/Fripost/Schema/Local.pm index 9efff91..f497a4e 100644 --- a/lib/Fripost/Schema/Local.pm +++ b/lib/Fripost/Schema/Local.pm @@ -49,6 +49,7 @@ sub get { (&(objectClass=FripostVirtualList)(fvl=$l)))", attrs => [ qw/fvu description fripostIsStatusActive + fripostIsStatusPending fripostOptionalMaildrop fripostMailboxQuota fva fripostMaildrop @@ -91,6 +92,7 @@ sub get { } $ret{isactive} = $local->get_value('fripostIsStatusActive') eq 'TRUE'; $ret{description} = concat($concat, $local->get_value('description')); + $ret{ispending} = ($local->get_value('fripostIsStatusPending') // '') eq 'TRUE'; return %ret; } diff --git a/lib/Fripost/Schema/Mailbox.pm b/lib/Fripost/Schema/Mailbox.pm index 95e2d10..ce23d98 100644 --- a/lib/Fripost/Schema/Mailbox.pm +++ b/lib/Fripost/Schema/Mailbox.pm @@ -134,8 +134,8 @@ sub add { } eval { + die "Missing user name\n" unless $m->{user} =~ /^.+\@.+$/; my ($l,$d) = split /\@/, email_to_ascii($m->{user}), 2; - die "Missing user name\n" if $l eq ''; &_is_valid($m); die "‘".$m->{user}."’ already exists\n" if $self->local->exists($m->{user},%options); |