aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL2
-rwxr-xr-xcgi-bin/index.fcgi4
-rw-r--r--css/style.css4
-rw-r--r--lib/Fripost/Panel/Interface.pm15
-rw-r--r--template/add-alias.html4
-rw-r--r--template/add-list.html2
-rw-r--r--template/add-mailbox.html4
-rw-r--r--template/edit-alias.html4
-rw-r--r--template/edit-list.html2
-rw-r--r--template/edit-mailbox.html4
-rw-r--r--template/list-locals.html10
11 files changed, 37 insertions, 18 deletions
diff --git a/INSTALL b/INSTALL
index 26a1478..e94f248 100644
--- a/INSTALL
+++ b/INSTALL
@@ -36,6 +36,8 @@ sudo mkdir -p /etc/fripost-panel/ /var/lib/fripost-panel/gnupg
sudo chown fpanel:nogroup /var/lib/fripost-panel/gnupg && sudo chmod 0700 -R /var/lib/fripost-panel/
sudo -u fpanel cp ./config.in /etc/fripost-panel/ && sudo chmod 0600 /etc/fripost-panel/config.in
sudo chown -R fpanel:www-data /etc/fripost-panel/
+sudo chown -R root:www-data /opt/fripost-panel/
+sudo ln -s /opt/fripost-panel/bin/fripost-panel /usr/local/sbin/
# Edit /etc/fripost-panel/config.in
diff --git a/cgi-bin/index.fcgi b/cgi-bin/index.fcgi
index 5c73463..7fbe30d 100755
--- a/cgi-bin/index.fcgi
+++ b/cgi-bin/index.fcgi
@@ -17,10 +17,14 @@ use lib 'lib';
use Fripost::Panel::Interface;
use CGI::Carp 'fatalsToBrowser';
+# Make all warnings fatal.
+$SIG{__WARN__} = sub { die @_; };
+
my $config_dir = '/etc/fripost-panel';
my @config = catfile ('./', 'default.in');
push @config, catfile ($config_dir, 'config.in') if -f catfile ($config_dir, 'config.in');
+
while (my $q = CGI::Fast::->new){
my $cgi = Fripost::Panel::Interface::->new(
QUERY => $q,
diff --git a/css/style.css b/css/style.css
index cee3337..493856a 100644
--- a/css/style.css
+++ b/css/style.css
@@ -125,6 +125,10 @@ table.list thead th {
text-align: center;
color:#66a3d3
}
+.permlist {
+ font-size: 9pt;
+font-weight: normal;
+}
.none {
font-size: 6pt;
color: lightgray;
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm
index ff9b291..4e5b48e 100644
--- a/lib/Fripost/Panel/Interface.pm
+++ b/lib/Fripost/Panel/Interface.pm
@@ -44,8 +44,7 @@ sub ListDomains : StartRunmode {
$fp->done;
my $template = $self->load_tmpl( 'list-domains.html', cache => 1,
- , loop_context_vars => 1
- , global_vars => 1 );
+ , loop_context_vars => 1 );
$template->param( $self->userInfo );
$template->param( domains => [ map { { &mkLink( domain => $_->{domain})
, isactive => $_->{isactive}
@@ -79,8 +78,7 @@ sub ListLocals : Runmode {
$fp->done;
my $template = $self->load_tmpl( 'list-locals.html', cache => 1,
- , loop_context_vars => 1
- , global_vars => 1 );
+ , loop_context_vars => 1 );
$template->param( $self->userInfo );
$template->param( domain => encode_entities($domain{domain})
@@ -109,6 +107,9 @@ sub ListLocals : Runmode {
# Can the user add aliases?
$template->param( canAddalias => $domain{permissions} =~ /[aop]/ );
+ $template->param( listCanAddAlias => [ map { {user => encode_entities($_)} }
+ @{$domain{canCreateAlias}} ] )
+ if $domain{permissions} =~ /[op]/;
# Should we list aliases?
$template->param( listAliases => $#aliases >= 0 ||
$domain{permissions} =~ /[aop]/ );
@@ -128,6 +129,9 @@ sub ListLocals : Runmode {
# Can the user add lists?
$template->param( canAddList => $domain{permissions} =~ /[lop]/ );
+ $template->param( listCanAddList => [ map { {user => encode_entities($_)} }
+ @{$domain{canCreateList}} ] )
+ if $domain{permissions} =~ /[op]/;
# Should we list lists?
$template->param( listLists => $#lists >= 0 || $domain{permissions} =~ /[lop]/ );
$template->param( lists => [
@@ -176,8 +180,7 @@ sub EditDomain : Runmode {
$fp->done;
my $template = $self->load_tmpl( 'edit-domain.html', cache => 1,
- , loop_context_vars => 1
- , global_vars => 1 );
+ , loop_context_vars => 1 );
$template->param( $self->userInfo );
$template->param( domain => encode_entities($d)
, isPostmaster => $domain{permissions} eq 'p');
diff --git a/template/add-alias.html b/template/add-alias.html
index 43ad960..3283a59 100644
--- a/template/add-alias.html
+++ b/template/add-alias.html
@@ -53,7 +53,7 @@
<hr/>
<h4 class="label">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
@@ -61,7 +61,7 @@
<hr/>
<h4 class="label">Destination(s)</h4>
- <textarea name="maildrop" cols="50" rows="10" ><TMPL_VAR NAME=maildrop></textarea>
+ <textarea name="maildrop" cols="50" rows="5" ><TMPL_VAR NAME=maildrop></textarea>
<div class="help">
The list of destinations (one e-mail address per line) that
will receive mail for this alias.
diff --git a/template/add-list.html b/template/add-list.html
index 221d66a..59ca226 100644
--- a/template/add-list.html
+++ b/template/add-list.html
@@ -73,7 +73,7 @@
<hr/>
<h4 class="label">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
diff --git a/template/add-mailbox.html b/template/add-mailbox.html
index 64d116f..7fc2239 100644
--- a/template/add-mailbox.html
+++ b/template/add-mailbox.html
@@ -68,7 +68,7 @@
<hr/>
<h4 class="label">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
@@ -76,7 +76,7 @@
<hr/>
<h4 class="label">Mail forwarding</h4>
- <textarea name="forwards" cols="50" rows="10" ><TMPL_VAR NAME=forwards></textarea>
+ <textarea name="forwards" cols="50" rows="5" ><TMPL_VAR NAME=forwards></textarea>
<div class="help">
An optional list of destinations (one e-mail address per line) that
will <i>also</i> receive mail delivered to this mailbox.
diff --git a/template/edit-alias.html b/template/edit-alias.html
index ec8e10c..60a7d2b 100644
--- a/template/edit-alias.html
+++ b/template/edit-alias.html
@@ -54,7 +54,7 @@
<hr/>
<h4 class="label" id="description">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
@@ -62,7 +62,7 @@
<hr/>
<h4 class="label" id="destination">Destination(s)</h4>
- <textarea name="maildrop" cols="50" rows="10" ><TMPL_VAR NAME=maildrop></textarea>
+ <textarea name="maildrop" cols="50" rows="5" ><TMPL_VAR NAME=maildrop></textarea>
<div class="help">
The list of destinations (one e-mail address per line) that
will receive mail sent to
diff --git a/template/edit-list.html b/template/edit-list.html
index 357390e..6eeae7c 100644
--- a/template/edit-list.html
+++ b/template/edit-list.html
@@ -54,7 +54,7 @@
<hr/>
<h4 class="label" id="description">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
diff --git a/template/edit-mailbox.html b/template/edit-mailbox.html
index 98bd2ea..41fcf45 100644
--- a/template/edit-mailbox.html
+++ b/template/edit-mailbox.html
@@ -81,7 +81,7 @@
<hr/>
<h4 class="label" id="description">Description</h4>
- <textarea name="description" cols="50" rows="3" ><TMPL_VAR NAME=description></textarea>
+ <textarea name="description" cols="50" rows="5" ><TMPL_VAR NAME=description></textarea>
<div class="help">
An optional description. (HTML tags are allowed.)
</div>
@@ -89,7 +89,7 @@
<hr/>
<h4 class="label" id="forward">Mail forwarding</h4>
- <textarea name="forwards" cols="50" rows="10" ><TMPL_VAR NAME=forwards></textarea>
+ <textarea name="forwards" cols="50" rows="5" ><TMPL_VAR NAME=forwards></textarea>
<div class="help">
An optional list of destinations (one e-mail address per line) that
will receive mail for
diff --git a/template/list-locals.html b/template/list-locals.html
index d87f4c9..afff04a 100644
--- a/template/list-locals.html
+++ b/template/list-locals.html
@@ -70,7 +70,10 @@
<TMPL_IF NAME=listAliases>
<h3>Alias<TMPL_IF NAME=canAddAlias
><span class="action">[<a href="./?a=add&amp;t=alias">add</a>]</span
- ></TMPL_IF></h3>
+ ></TMPL_IF><TMPL_IF NAME=listCanAddAlias><span class="permlist"
+ >They can also create new aliases:
+ <TMPL_LOOP NAME=listCanAddAlias><span class="email"><TMPL_VAR NAME=user></span><TMPL_UNLESS NAME=__last__>, </TMPL_UNLESS></TMPL_LOOP
+ >.</span></TMPL_IF></h3>
<table class="list" id="aliases">
<thead>
@@ -108,7 +111,10 @@
<TMPL_IF NAME=listLists>
<h3>Lists<TMPL_IF NAME=canAddList
><span class="action">[<a href="./?a=add&amp;t=list">add</a>]</span
- ></TMPL_IF></h3>
+ ></TMPL_IF><TMPL_IF NAME=listCanAddList><span class="permlist"
+ >They can also create new lists:
+ <TMPL_LOOP NAME=listCanAddList><span class="email"><TMPL_VAR NAME=user></span><TMPL_UNLESS NAME=__last__>, </TMPL_UNLESS></TMPL_LOOP
+ >.</span></TMPL_IF></h3>
<table class="list" id="lists">
<thead>