aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Fripost/Panel/Interface.pm16
-rw-r--r--lib/Fripost/Schema/Domain.pm30
-rw-r--r--lib/Fripost/Schema/Util.pm4
-rw-r--r--templates/edit-domain.html8
4 files changed, 29 insertions, 29 deletions
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm
index c7e892c..d04fa3a 100644
--- a/lib/Fripost/Panel/Interface.pm
+++ b/lib/Fripost/Panel/Interface.pm
@@ -108,7 +108,7 @@ sub ListLocals : Runmode {
# Can the user add aliases?
$template->param( canAddalias => $domain{permissions} =~ /[aop]/ );
$template->param( listCanAddAlias => [ map { {user => encode_entities($_)} }
- @{$domain{canCreateAlias}} ] )
+ @{$domain{canAddAlias}} ] )
if $domain{permissions} =~ /[op]/;
# Should we list aliases?
$template->param( listAliases => $#aliases >= 0 ||
@@ -130,7 +130,7 @@ sub ListLocals : Runmode {
# Can the user add lists?
$template->param( canAddList => $domain{permissions} =~ /[lop]/ );
$template->param( listCanAddList => [ map { {user => encode_entities($_)} }
- @{$domain{canCreateList}} ] )
+ @{$domain{canAddList}} ] )
if $domain{permissions} =~ /[op]/;
# Should we list lists?
$template->param( listLists => $#lists >= 0 || $domain{permissions} =~ /[lop]/ );
@@ -172,8 +172,8 @@ sub EditDomain : Runmode {
isactive => $q->param('isactive'),
description => $q->param('description'),
catchalls => $q->param('catchalls'),
- canCreateAlias => $q->param('canCreateAlias'),
- canCreateList => $q->param('canCreateList')
+ canAddAlias => $q->param('canAddAlias'),
+ canAddList => $q->param('canAddList')
}, -concat => "(\n|\x{0D}\x{0A})");
}
my %domain = $fp->domain->get( $d, -die => 404 );
@@ -189,16 +189,16 @@ sub EditDomain : Runmode {
$template->param( isactive => $q->param('isactive')
, description => $q->param('description')
, catchalls => $q->param('catchalls')
- , canCreateAlias => $q->param('canCreateAlias')
- , canCreateList => $q->param('canCreateList')
+ , canAddAlias => $q->param('canAddAlias')
+ , canAddList => $q->param('canAddList')
, error => encode_entities ($error) );
}
else {
$template->param( isactive => $domain{isactive}
, description => &mkFormContent (@{$domain{description}})
, catchalls => &mkFormContentE (@{$domain{catchalls}})
- , canCreateAlias => &mkFormContentE (@{$domain{canCreateAlias}})
- , canCreateList => &mkFormContentE (@{$domain{canCreateList}})
+ , canAddAlias => &mkFormContentE (@{$domain{canAddAlias}})
+ , canAddList => &mkFormContentE (@{$domain{canAddList}})
);
}
$template->param( newChanges => defined $q->param('submit') );
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');
diff --git a/templates/edit-domain.html b/templates/edit-domain.html
index dbbdf3c..c814a20 100644
--- a/templates/edit-domain.html
+++ b/templates/edit-domain.html
@@ -73,8 +73,8 @@
<TMPL_IF NAME=isPostmaster>
<hr/>
- <h4 class="label" id="canCreateAlias">Grant right to create aliases</h4>
- <textarea name="canCreateAlias" cols="50" rows="5" ><TMPL_VAR NAME=canCreateAlias></textarea>
+ <h4 class="label" id="canAddAlias">Grant right to create aliases</h4>
+ <textarea name="canAddAlias" cols="50" rows="5" ><TMPL_VAR NAME=canAddAlias></textarea>
<div class="help">
An optional list of e-mails (one address per line) that are
allowed to create aliases under your domain
@@ -91,8 +91,8 @@
<hr/>
- <h4 class="label" id="canCreateList">Grant right to create lists</h4>
- <textarea name="canCreateList" cols="50" rows="5" ><TMPL_VAR NAME=canCreateList></textarea>
+ <h4 class="label" id="canAddList">Grant right to create lists</h4>
+ <textarea name="canAddList" cols="50" rows="5" ><TMPL_VAR NAME=canAddList></textarea>
<div class="help">
An optional list of e-mails (one address per line) that are
allowed to create mailing lists under your domain