diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-19 02:22:17 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2013-01-19 02:22:17 +0100 |
commit | f7701a60f217ab154fe53a5d13bbd223f6182150 (patch) | |
tree | 8334d13eb9a7e58065be7db608718bad605fd07c /lib/Fripost/Schema | |
parent | 145a6fc76882769391e1e9792db868b692bc4538 (diff) |
CanCreate → CanAdd
Diffstat (limited to 'lib/Fripost/Schema')
-rw-r--r-- | lib/Fripost/Schema/Domain.pm | 30 | ||||
-rw-r--r-- | lib/Fripost/Schema/Util.pm | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/Fripost/Schema/Domain.pm b/lib/Fripost/Schema/Domain.pm index dc16ae0..e86822f 100644 --- a/lib/Fripost/Schema/Domain.pm +++ b/lib/Fripost/Schema/Domain.pm @@ -79,8 +79,8 @@ sub get { attrs => [ qw/fvd description fripostIsStatusActive fripostOptionalMaildrop - fripostCanCreateAlias - fripostCanCreateList + fripostCanAddAlias + fripostCanAddList fripostOwner fripostPostmaster/ ] ); @@ -103,10 +103,10 @@ sub get { , catchalls => concat($concat, map { &_email_to_unicode ($_) } $domain->get_value('fripostOptionalMaildrop')) , permissions => get_perms($domain, $self->whoami) - , canCreateAlias => concat($concat, map { &_email_to_unicode ($self->_dn2fvu($_)) } - $domain->get_value('fripostCanCreateAlias')) - , canCreateList => concat($concat, map { &_email_to_unicode ($self->_dn2fvu($_)) } - $domain->get_value('fripostCanCreateList')) + , canAddAlias => concat($concat, map { &_email_to_unicode ($self->_dn2fvu($_)) } + $domain->get_value('fripostCanAddAlias')) + , canAddList => concat($concat, map { &_email_to_unicode ($self->_dn2fvu($_)) } + $domain->get_value('fripostCanAddList')) ) } @@ -122,7 +122,7 @@ sub replace { my $d = shift; my %options = @_; - foreach (qw/description catchalls canCreateAlias canCreateList/) { + foreach (qw/description catchalls canAddAlias canAddList/) { $d->{$_} = explode ($options{'-concat'}, $d->{$_}) if defined $d->{$_}; } @@ -135,12 +135,12 @@ sub replace { 'TRUE' : 'FALSE' , description => $d->{description} , fripostOptionalMaildrop => $d->{catchalls} - , fripostCanCreateAlias => + , fripostCanAddAlias => [ map $self->_fvu2dn($_), - @{$d->{canCreateAlias}} ] - , fripostCanCreateList => + @{$d->{canAddAlias}} ] + , fripostCanAddList => [ map $self->_fvu2dn($_), - @{$d->{canCreateList}} ] + @{$d->{canAddList}} ] } ); die $mesg->error."\n" if $mesg->code; }; @@ -175,10 +175,10 @@ sub _is_valid { -exact => 1 ); $d->{catchalls} = [ map { email_valid($_, -prefix => 'fake') } @{$d->{catchalls}} ]; - $d->{canCreateAlias} = [ map { email_valid($_, -prefix => 'fake') } - @{$d->{canCreateAlias}} ]; - $d->{canCreateList} = [ map { email_valid($_, -prefix => 'fake') } - @{$d->{canCreateList}} ]; + $d->{canAddAlias} = [ map { email_valid($_, -prefix => 'fake') } + @{$d->{canAddAlias}} ]; + $d->{canAddList} = [ map { email_valid($_, -prefix => 'fake') } + @{$d->{canAddList}} ]; } diff --git a/lib/Fripost/Schema/Util.pm b/lib/Fripost/Schema/Util.pm index 8d75a3a..b26214b 100644 --- a/lib/Fripost/Schema/Util.pm +++ b/lib/Fripost/Schema/Util.pm @@ -67,11 +67,11 @@ sub get_perms { $perms .= 'a' if grep { $dn eq $_ or $dn2 eq $_ } - $entry->get_value ('fripostCanCreateAlias'); + $entry->get_value ('fripostCanAddAlias'); $perms .= 'l' if grep { $dn eq $_ or $dn2 eq $_ } - $entry->get_value ('fripostCanCreateList'); + $entry->get_value ('fripostCanAddList'); $perms = 'o' if grep { $dn eq $_ } $entry->get_value('fripostOwner'); |