diff --git a/Dockerfile b/Dockerfile index 0f682ed..f231829 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,6 +69,12 @@ RUN touch /etc/sympa/transport.sympa \ RUN postmap hash:/etc/sympa/transport.sympa && \ postmap hash:/etc/sympa/virtual.sympa +COPY whitelist-1.1/custom_actions /etc/sympa +COPY whitelist-1.1/scenari /etc/sympa +COPY whitelist-1.1/web_tt2 /etc/sympa +RUN touch /etc/sympa/search_filters/whitelist.txt /etc/sympa/search_filters/modlist.txt +RUN chown -R sympa:sympa /etc/sympa + EXPOSE 25 80 465 VOLUME /var/lib/sympa \ diff --git a/whitelist-1.1/custom_actions/modlist.pm b/whitelist-1.1/custom_actions/modlist.pm new file mode 100644 index 0000000..43815c5 --- /dev/null +++ b/whitelist-1.1/custom_actions/modlist.pm @@ -0,0 +1,90 @@ +#============================================================= -*-Perl-*- +# +# DESCRIPTION +# Sympa 6.2 plugin for whitelist management +# +# AUTHOR +# Steve Shipway +# University of Auckland, New Zealand +# September 2015 +# +#============================================================================ +# v0.1 - initial release for Sympa 6.1 +# v0.2 - cope with situation where no robot subdir is used +# v1.0 - Sympa 6.2 conversion +# v1.1 - Strange processing of multiple @cap entries + +package modlist_plugin; +#use Sympa::Constants; +use strict; + +our $VERSION = 1.01; + +our $FILENAME = "modlist"; + +sub process { + my( $listref ) = shift; # reference to list object + my( $action ); # sub-action for this lca + my( %stash ) = (); # variables to pass back to TT2 template + my($rv) = ""; + my($sfdir)=''; + my(@data) = (); # file content as array + my($data) = ''; # file content as single string + + $action = shift; # extract plugin action + $data = join '/',@_; # rejoin all parameters + $data =~ s/\x00//g; # remove nulls caused by multiple @cap parameters + + # Must run in list context + return 'home' if(!ref $listref); + + # All use same TT2 + $stash{x_name} = $FILENAME; + $stash{x_ucfname} = ucfirst $FILENAME; + $stash{next_action} = "lca:whitelist"; + $stash{x_saved}=0; + + # Identify the search_filters directory. + $sfdir = $listref->{'dir'}."/search_filters"; + $stash{sfdir}=$sfdir; + if( ! -d $sfdir ) { mkdir $sfdir; } + if( ! -d $sfdir ) { + $stash{x_saveerror}="Unable to make list search_filters directory"; + return \%stash; + } + + # IF IN SAVE CONTEXT then save the new content + if( $action eq 'save' ) { + $data =~ s/\s*[\r\n]\s+/\n/g; # kill blank lines + if( open MYFILE,(">${sfdir}/${FILENAME}.txt" )) { + print MYFILE $data; + close MYFILE; + $stash{x_saved}=1; + } else { + $rv = "Unable to save: $!"; + $stash{x_saveerror}=$rv; + } + $stash{x_data}=$data; + my @rows = split /\n/,$data; + $stash{x_rows}=($#rows + 1); + return \%stash; + } + + # Load the content + if( -r "${sfdir}/${FILENAME}.txt") { + open MYFILE,"<${sfdir}/${FILENAME}.txt"; + @data = ; + close MYFILE; + } else { + push @data, "# No $FILENAME found\n"; + push @data, "# list your email address patterns here\n"; + } + $data = join "",@data; + $stash{x_data}=$data; + $stash{x_rows}=($#data + 1); + + return \%stash; +} + +1; + diff --git a/whitelist-1.1/custom_actions/whitelist.pm b/whitelist-1.1/custom_actions/whitelist.pm new file mode 100644 index 0000000..78be55e --- /dev/null +++ b/whitelist-1.1/custom_actions/whitelist.pm @@ -0,0 +1,90 @@ +#============================================================= -*-Perl-*- +# +# DESCRIPTION +# Sympa 6.2 plugin for whitelist management +# +# AUTHOR +# Steve Shipway +# University of Auckland, New Zealand +# September 2015 +# +#============================================================================ +# v0.1 - initial release for Sympa 6.1 +# v0.2 - cope with situation where no robot subdir is used +# v1.0 - Sympa 6.2 conversion +# v1.1 - Strange processing of multiple @cap entries + +package whitelist_plugin; +#use Sympa::Constants; +use strict; + +our $VERSION = 1.01; + +our $FILENAME = "whitelist"; + +sub process { + my( $listref ) = shift; # reference to list object + my( $action ); # sub-action for this lca + my( %stash ) = (); # variables to pass back to TT2 template + my($rv) = ""; + my($sfdir)=''; + my(@data) = (); # file content as array + my($data) = ''; # file content as single string + + $action = shift; # extract plugin action + $data = join '/',@_; # rejoin all parameters + $data =~ s/\x00//g; # remove nulls caused by multiple @cap parameters + + # Must run in list context + return 'home' if(!ref $listref); + + # All use same TT2 + $stash{x_name} = $FILENAME; + $stash{x_ucfname} = ucfirst $FILENAME; + $stash{next_action} = "lca:whitelist"; + $stash{x_saved}=0; + + # Identify the search_filters directory. + $sfdir = $listref->{'dir'}."/search_filters"; + $stash{sfdir}=$sfdir; + if( ! -d $sfdir ) { mkdir $sfdir; } + if( ! -d $sfdir ) { + $stash{x_saveerror}="Unable to make list search_filters directory"; + return \%stash; + } + + # IF IN SAVE CONTEXT then save the new content + if( $action eq 'save' ) { + $data =~ s/\s*[\r\n]\s+/\n/g; # kill blank lines + if( open MYFILE,(">${sfdir}/${FILENAME}.txt" )) { + print MYFILE $data; + close MYFILE; + $stash{x_saved}=1; + } else { + $rv = "Unable to save: $!"; + $stash{x_saveerror}=$rv; + } + $stash{x_data}=$data; + my @rows = split /\n/,$data; + $stash{x_rows}=($#rows + 1); + return \%stash; + } + + # Load the content + if( -r "${sfdir}/${FILENAME}.txt") { + open MYFILE,"<${sfdir}/${FILENAME}.txt"; + @data = ; + close MYFILE; + } else { + push @data, "# No $FILENAME found\n"; + push @data, "# list your email address patterns here\n"; + } + $data = join "",@data; + $stash{x_data}=$data; + $stash{x_rows}=($#data + 1); + + return \%stash; +} + +1; + diff --git a/whitelist-1.1/scenari/include.send.header b/whitelist-1.1/scenari/include.send.header new file mode 100644 index 0000000..77f5b96 --- /dev/null +++ b/whitelist-1.1/scenari/include.send.header @@ -0,0 +1,8 @@ +title.gettext Process whitelist and modlist, if they exist + +# Copy/rename this scenario to be include.send.header to make white/mod lists +# work for every list regardless of the chosen scenario + +search(modlist.txt) smtp,smime -> editorkey,quiet +search(whitelist.txt) smtp,smime -> do_it + diff --git a/whitelist-1.1/web_tt2/admin.tt2 b/whitelist-1.1/web_tt2/admin.tt2 new file mode 100644 index 0000000..f030ea6 --- /dev/null +++ b/whitelist-1.1/web_tt2/admin.tt2 @@ -0,0 +1,89 @@ + +

[%|loc%]Casual administration[%END%]

+ + +[% IF is_listmaster || is_owner || is_privileged_owner %] +

[%|loc%]Drastic operations[%END%]

+ +[% IF is_privileged_owner %] + [% IF list_conf.status == 'closed' ~%] +
+
+ + [%|loc%]This list is currently closed. Clicking this button will make it active again.[%END%] + + +
+
+ [%~ ELSIF is_included ~%] +

[%|loc%]Closing or renaming this list is impossible, because it is included by other mailing list(s).[%END%] +
+ [%|loc(list)%]View lists including %1[%END%] +

+ [%~ ELSE ~%] +
+
+ + [%|loc%]Completely removes the current list. Listmaster privileges are required to restore a list once it has been removed.[%END%] + +
+
+ [%~ END %] + [% IF may_create_list && ! is_included ~%] +
+
+ [%|loc%]Allows you to change this list's name. Everything related to the list will be renamed, including the mail aliases and the web archives.[%END%] + +
+
+ [%~ END ~%] +[% END %] + +[% IF is_listmaster || is_owner %] +
+
+[% IF shared == 'none' %] + [%|loc%]Initializes the shared document web space.[%END%] + + +[% ELSIF shared == 'exist' %] + + [%|loc%]Closes the shared document web space. It can be restored using "Restore shared" button.[%END%] + + +[% ELSIF shared == 'deleted' %] + [%|loc%]Restores the previously closed shared document web space.[%END%] + + +[% END %] +
+
+[% END %] +[% END %] + diff --git a/whitelist-1.1/web_tt2/nav.tt2 b/whitelist-1.1/web_tt2/nav.tt2 new file mode 100644 index 0000000..e5e7e25 --- /dev/null +++ b/whitelist-1.1/web_tt2/nav.tt2 @@ -0,0 +1,324 @@ + +[% IF action == 'create_list_request' %] +[% IF all_lists.size > 0 ~%] +

+ [%|loc%]Create list[%END%] + + + +

+ +
+ +
+
+ [%|loc%]Create list[%END%] +
+ +
+
+ + +[%~ END %] +[% END %] + +[% IF action == 'serveradmin' or action == 'skinsedit' or action == 'edit_config' or action == 'get_pending_lists' or action == 'get_closed_lists' or action == 'get_latest_lists' or action == 'get_inactive_lists' %] +

+ [%|loc%]Listmaster Admin[%END%] +

+ +
+ +
+
+ [%|loc%]Listmaster Admin[%END%] +
+ +
+
+ + +[% END %] + +[% IF action == 'lists' %] +

+ [%|loc%]Index of lists[%END%] +

+ +[% letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','others' ] ~%] + +
+ +
+
+ [%|loc%]Index of lists[%END%] +
+ +
+
+ + +[% END %] + +[% IF action == 'admin' || action_type == 'admin' || action == 'editfile' ~%] +

[%|loc%]Basic Operations[%END%]

+ +
+
+
+ [%|loc%]Basic Operations[%END%] +
+ +
+
+ +[% IF action == 'edit_list_request' || action == 'editfile' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %] + + +[% END %] + +[% IF action == 'compose_mail' %] +

+ [% IF subaction == "html_news_letter" ~%] + [%|loc%]Sending an HTML page to the list[%END%] + [%~ ELSE ~%] + [%|loc%]Sending a message to the list[%END%] + [%~ END %] + + + +

+ +
+
+
+ + [% IF subaction == "html_news_letter" ~%] + [%|loc%]Sending an HTML page to the list[%END%] + [%~ ELSE ~%] + [%|loc%]Sending a message to the list[%END%] + [%~ END %] + +
+ +
+
+ + [% IF subaction == '' %][% SET class = 'active' %][% ELSE %][% SET class = '' %][% END %] + + +[% END %] + +[% IF action == 'd_read' ~%] +

+ [%|loc%]Shared documents[%END%] + + + +

+ +
+
+
+ [%|loc%]Shared documents[%END%] +
+ +
+
+ + +[%~ END %] + + diff --git a/whitelist-1.1/web_tt2/review.tt2 b/whitelist-1.1/web_tt2/review.tt2 new file mode 100644 index 0000000..9a49319 --- /dev/null +++ b/whitelist-1.1/web_tt2/review.tt2 @@ -0,0 +1,445 @@ + + +[% IF !page || page.match('^\d*$') ~%] + [% PROCESS ReviewMembers ~%] +[%~ ELSIF page == 'owner' ~%] + [% PROCESS ReviewUsers + role = page + users = owners %] +[%~ ELSIF page == 'editor' ~%] + [% PROCESS ReviewUsers + role = page + users = editors %] +[%~ END %] + +[%~ BLOCK ReviewMembers # (members) ~%] + +[% IF is_owner %] +

[%|loc%]Manage list members[%END%] + + + +

+ +

[%|loc%]Administrative Options[%END%]

+ [%|loc%]Pending subscriptions[%END%] + [%|loc%]Pending unsubscriptions[%END%] + [% IF conf.use_blacklist != 'none' %] + [%|loc%]Blacklist[%END%] + [% END %] + [%|loc%]Bounces[%END%] + [% IF action == 'search' %] + [%|loc%]Dump[%END%] + [% ELSE %] + [%|loc%]Dump[%END%] + [% END %] + [%|loc%]Exclude[%END%] +
+ + [% IF may_sync %] +
+
+ + +
+ [% END %] +
+

[%|loc%]Subscription reminder message[%END%]

+
+ + + +
+
+ [%# If a list is not 'open' and allow_subscribe_if_pending has been set to + 'off', add cannot be performed. ~%] + [% IF list_status == 'open' || conf.allow_subscribe_if_pending == 'on' ~%] +

[%|loc%]Add Subscribers[%END%]

+
+

[%|loc%]To add an individual user:[%END%]

+
+ + + +
+ + +
+
+ + +
+
+ +
+
+
+

[%|loc%]To add multiple users:[%END%]

+

[%|loc%]Click the Multiple Add button below to bulk-add users using a form. (Alternatively, consider using a data-source such as SQL or an Active Directory Group).[%END%]

+
+

+ + [%|loc%]Multiple add[%END%] + +

+
+
+ [%~ END %] +[% END %] + +

[%|loc%]Search for a User[%END%]

+
+
+ + + + + + + +[% IF action == 'search' %] +[% IF too_many_select %] +[%|loc%]Selection too wide, unable to display selection[%END%] +[% END %] +[% END %] +
+
+ +
+

[%|loc%]Subscriber Table[%END%]

+ +
+
+ + + +[% IF action == 'search' %] +

[%|loc(occurrence)%]%1 occurrence(s) found[%END%]

+[% END %] + +[% SET thosesubscribers = members %] +[% PROCESS subscriber_table.tt2 %] + +[% IF action == 'search' %] + [% IF similar_subscribers_occurence != 0 %] +

[%|loc(similar_subscribers_occurence)%] Other similar subscriber's email(s) (%1)[%END%]

+ [% SET thosesubscribers = similar_subscribers %] + [% PROCESS subscriber_table.tt2 %] + [% END %] +[% END %] + +[% IF total != 0 %] + [% IF is_owner %] +
+ +
+
+ +
+
+ + +
+ [% END %] +
+ + [% IF action == 'search' %] +

[%|loc%]Excluded users[%END%]

+ + + + + + + + [% IF user.email %] + [% IF exclude_users %] + [% FOREACH exc = exclude_users %] + + + + + [% END %] + [% END %] + [% END %] +
[%|loc%]List of exclude[%END%]
[%|loc%]Email[%END%][%|loc%]Since[%END%]
 [% exc.email %]  [% exc.since %] 
+ [% END %] +
+
+ +[% IF action != 'search' %] +
+
+
+ + + + + [% SET mysize = (size || 0) ~%] + + +
+
+ [% IF prev_page ~%] + + + + [%~ END %] + [% IF page ~%] + [%|loc(page,total_page)%]page %1 / %2[%END%] + [%~ END %] + [% IF next_page ~%] + + + + [%~ END %] +
+[% END %] + +[% END %] + +[%~ END #ReviewMembers %] + +[%~ BLOCK ReviewUsers # (role,users) ~%] + [% PROCESS config_common.tt2 ~%] + + [% SET pS = config_schema.0 ~%] + [% SET pV = config_values.${pS.name} ~%] + [% SET pF = { + email => 'small-6 medium-4 columns', + gecos => 'small-6 medium-4 columns', + reception => 'medium-2 columns show-for-medium', + visibility => 'medium-2 columns show-for-medium', + info => 'columns', + } ~%] + + [% PROCESS EditListHeading + ppaths = [pS.name] + pitem = pS + helem = 'h2' + ~%] + +
+
+ + + [%~# FIXME ~%] + +
+
+ [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ +
+ [%~ END %] + + +
+ + [% IF pS.privilege == 'write' && is_privileged_owner ~%] +
+ +
+ [%~ END %] +
+ + [% SET oI = 0 ~%] + [% IF pV.size() ~%] + [% FOREACH oV = pV ~%] +
+
+ [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ [% IF kS.name == 'email' ~%] + + [%~ IF pS.name == 'owner' && oV.profile == 'privileged' ~%] + + [%~ ELSIF pS.name == 'owner' ~%] + + [%~ ELSIF pS.name == 'editor' ~%] + + [%~ END %] + + [% IF pS.privilege == 'write' && is_privileged_owner ~%] + [% oV.email %] + [%~ ELSE ~%] + [% oV.email %] + [%~ END %] + [%~ ELSIF kS.name == 'reception' || kS.name == 'visibility' ~%] + [% oV.${kS.name} | optdesc %] + [%~ ELSE ~%] + [% oV.${kS.name} || ' ' %] + [%~ END %] +
+ [%~ END %] + + +
+ +
+ [% IF is_privileged_owner && oV.subscribed ~%] + [% PROCESS EditListArrayDel + ppaths = [pS.name,oI] + pitem = pS + labelled = 0 + val = oV.email + ~%] + [%~ ELSE ~%] +   + [%~ END %] +
+
+ + [%~ SET oI = oI + 1 %] + [%~ END %] + [%~ ELSE ~%] +

+ [% IF pS.name == 'owner' ~%] + [%|loc%]List has no owners[%END%] + [%~ ELSIF pS.name == 'editor' ~%] + [%|loc%]List has no moderators[%END%] + [%~ END %] +

+ [%~ END %] + + [% FOREACH kS = pS.format; + IF kS.name == 'email' && kS.privilege == 'write'; + SET is_writable = 1; + LAST; + END; + END ~%] + [% IF is_writable && is_privileged_owner ~%] +

+ [% IF pS.name == 'owner' ~%] + [%|loc%]Add owners[%END%] + [%~ ELSIF pS.name == 'editor' ~%] + [%|loc%]Add moderators[%END%] + [%~ END %] +

+ +
+
+ [% IF pS.name == 'owner' ~%] +
+ + +
+ [%~ END %] + + [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ [% UNLESS kS.privilege == 'write' ~%] +   + [%~ ELSIF kS.name == 'reception' ~%] + + + [%~ ELSIF kS.name == 'visibility' ~%] + + + [%~ ELSE ~%] + + + [%~ END %] +
+ [% END ~%] +
+ +
+ [%~ END %] + + [% IF pS.privilege == 'write' && is_privileged_owner ~%] + + + [% END ~%] + +
+
+ + [%# AJAX modal dialog ~%] + +[%~ END#ReviewUsers ~%] + + diff --git a/whitelist-1.1/web_tt2/search.tt2 b/whitelist-1.1/web_tt2/search.tt2 new file mode 100644 index 0000000..c1914e9 --- /dev/null +++ b/whitelist-1.1/web_tt2/search.tt2 @@ -0,0 +1,447 @@ + + +[% IF !page || page.match('^\d*$') ~%] + [% PROCESS ReviewMembers ~%] +[%~ ELSIF page == 'owner' ~%] + [% PROCESS ReviewUsers + role = page + users = owners %] +[%~ ELSIF page == 'editor' ~%] + [% PROCESS ReviewUsers + role = page + users = editors %] +[%~ END %] + +[%~ BLOCK ReviewMembers # (members) ~%] + +[% IF is_owner %] +

[%|loc%]Manage list members[%END%] + + + +

+ +

[%|loc%]Administrative Options[%END%]

+ [%|loc%]Pending subscriptions[%END%] + [%|loc%]Pending unsubscriptions[%END%] + [% IF conf.use_blacklist != 'none' %] + [%|loc%]Blacklist[%END%] + [%|loc%]Modlist[%END%] + [%|loc%]Whitelist[%END%] + [% END %] + [%|loc%]Bounces[%END%] + [% IF action == 'search' %] + [%|loc%]Dump[%END%] + [% ELSE %] + [%|loc%]Dump[%END%] + [% END %] + [%|loc%]Exclude[%END%] +
+ + [% IF may_sync %] +
+
+ + +
+ [% END %] +
+

[%|loc%]Subscription reminder message[%END%]

+
+ + + +
+
+ [%# If a list is not 'open' and allow_subscribe_if_pending has been set to + 'off', add cannot be performed. ~%] + [% IF list_status == 'open' || conf.allow_subscribe_if_pending == 'on' ~%] +

[%|loc%]Add Subscribers[%END%]

+
+

[%|loc%]To add an individual user:[%END%]

+
+ + + +
+ + +
+
+ + +
+
+ +
+
+
+

[%|loc%]To add multiple users:[%END%]

+

[%|loc%]Click the Multiple Add button below to bulk-add users using a form. (Alternatively, consider using a data-source such as SQL or an Active Directory Group).[%END%]

+
+

+ + [%|loc%]Multiple add[%END%] + +

+
+
+ [%~ END %] +[% END %] + +

[%|loc%]Search for a User[%END%]

+
+
+ + + + + + + +[% IF action == 'search' %] +[% IF too_many_select %] +[%|loc%]Selection too wide, unable to display selection[%END%] +[% END %] +[% END %] +
+
+ +
+

[%|loc%]Subscriber Table[%END%]

+ +
+
+ + + +[% IF action == 'search' %] +

[%|loc(occurrence)%]%1 occurrence(s) found[%END%]

+[% END %] + +[% SET thosesubscribers = members %] +[% PROCESS subscriber_table.tt2 %] + +[% IF action == 'search' %] + [% IF similar_subscribers_occurence != 0 %] +

[%|loc(similar_subscribers_occurence)%] Other similar subscriber's email(s) (%1)[%END%]

+ [% SET thosesubscribers = similar_subscribers %] + [% PROCESS subscriber_table.tt2 %] + [% END %] +[% END %] + +[% IF total != 0 %] + [% IF is_owner %] +
+ +
+
+ +
+
+ + +
+ [% END %] +
+ + [% IF action == 'search' %] +

[%|loc%]Excluded users[%END%]

+ + + + + + + + [% IF user.email %] + [% IF exclude_users %] + [% FOREACH exc = exclude_users %] + + + + + [% END %] + [% END %] + [% END %] +
[%|loc%]List of exclude[%END%]
[%|loc%]Email[%END%][%|loc%]Since[%END%]
 [% exc.email %]  [% exc.since %] 
+ [% END %] +
+
+ +[% IF action != 'search' %] +
+
+
+ + + + + [% SET mysize = (size || 0) ~%] + + +
+
+ [% IF prev_page ~%] + + + + [%~ END %] + [% IF page ~%] + [%|loc(page,total_page)%]page %1 / %2[%END%] + [%~ END %] + [% IF next_page ~%] + + + + [%~ END %] +
+[% END %] + +[% END %] + +[%~ END #ReviewMembers %] + +[%~ BLOCK ReviewUsers # (role,users) ~%] + [% PROCESS config_common.tt2 ~%] + + [% SET pS = config_schema.0 ~%] + [% SET pV = config_values.${pS.name} ~%] + [% SET pF = { + email => 'small-6 medium-4 columns', + gecos => 'small-6 medium-4 columns', + reception => 'medium-2 columns show-for-medium', + visibility => 'medium-2 columns show-for-medium', + info => 'columns', + } ~%] + + [% PROCESS EditListHeading + ppaths = [pS.name] + pitem = pS + helem = 'h2' + ~%] + +
+
+ + + [%~# FIXME ~%] + +
+
+ [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ +
+ [%~ END %] + + +
+ + [% IF pS.privilege == 'write' && is_privileged_owner ~%] +
+ +
+ [%~ END %] +
+ + [% SET oI = 0 ~%] + [% IF pV.size() ~%] + [% FOREACH oV = pV ~%] +
+
+ [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ [% IF kS.name == 'email' ~%] + + [%~ IF pS.name == 'owner' && oV.profile == 'privileged' ~%] + + [%~ ELSIF pS.name == 'owner' ~%] + + [%~ ELSIF pS.name == 'editor' ~%] + + [%~ END %] + + [% IF pS.privilege == 'write' && is_privileged_owner ~%] + [% oV.email %] + [%~ ELSE ~%] + [% oV.email %] + [%~ END %] + [%~ ELSIF kS.name == 'reception' || kS.name == 'visibility' ~%] + [% oV.${kS.name} | optdesc %] + [%~ ELSE ~%] + [% oV.${kS.name} || ' ' %] + [%~ END %] +
+ [%~ END %] + + +
+ +
+ [% IF is_privileged_owner && oV.subscribed ~%] + [% PROCESS EditListArrayDel + ppaths = [pS.name,oI] + pitem = pS + labelled = 0 + val = oV.email + ~%] + [%~ ELSE ~%] +   + [%~ END %] +
+
+ + [%~ SET oI = oI + 1 %] + [%~ END %] + [%~ ELSE ~%] +

+ [% IF pS.name == 'owner' ~%] + [%|loc%]List has no owners[%END%] + [%~ ELSIF pS.name == 'editor' ~%] + [%|loc%]List has no moderators[%END%] + [%~ END %] +

+ [%~ END %] + + [% FOREACH kS = pS.format; + IF kS.name == 'email' && kS.privilege == 'write'; + SET is_writable = 1; + LAST; + END; + END ~%] + [% IF is_writable && is_privileged_owner ~%] +

+ [% IF pS.name == 'owner' ~%] + [%|loc%]Add owners[%END%] + [%~ ELSIF pS.name == 'editor' ~%] + [%|loc%]Add moderators[%END%] + [%~ END %] +

+ +
+
+ [% IF pS.name == 'owner' ~%] +
+ + +
+ [%~ END %] + + [% FOREACH kS = pS.format ~%] + [% NEXT UNLESS pF.${kS.name} ~%] + [% NEXT UNLESS kS.privilege == 'read' || kS.privilege == 'write' ~%] + +
+ [% UNLESS kS.privilege == 'write' ~%] +   + [%~ ELSIF kS.name == 'reception' ~%] + + + [%~ ELSIF kS.name == 'visibility' ~%] + + + [%~ ELSE ~%] + + + [%~ END %] +
+ [% END ~%] +
+ +
+ [%~ END %] + + [% IF pS.privilege == 'write' && is_privileged_owner ~%] + + + [% END ~%] + +
+
+ + [%# AJAX modal dialog ~%] + +[%~ END#ReviewUsers ~%] + + diff --git a/whitelist-1.1/web_tt2/whitelist.tt2 b/whitelist-1.1/web_tt2/whitelist.tt2 new file mode 100644 index 0000000..1a9761b --- /dev/null +++ b/whitelist-1.1/web_tt2/whitelist.tt2 @@ -0,0 +1,73 @@ + +
+ +

[%|loc%]Gestion de la [% x_name %][%END%]


+ +[% IF is_owner || is_listmaster || may_add %] + +
+[% IF x_name == "whitelist" %] +Il s'agit de la liste blanche pour la liste [% list %]@[% robot %]. +

+[%|loc%]Tous les messages en provenance d'utilisateurs dont l'adresse e-mail est reconnue par l'un des filtres de la liste blanche sera immédiatement accepté.[%END%] +[% ELSE %] +Il s'agit de la liste modérée pour la liste [% list %]@[% robot %]. +

+[%|loc%]Tous les messages en provenance d'utilisateurs dont l'adresse e-mail est reconnue par l'un des filtres de la liste modérées sera immédiatement envoyé en modération.[%END%] +[% END %] +La liste noire a la priorité la plus forte, suivie par la liste modérée et enfin la liste blanche, qui ont tous une priorité supérieure à celle définie dans le scénario de la liste de diffusion. +

+[%|loc%]Syntaxe :[%END%] +
    +
  • [%|loc%]Seulement une adresse e-mail ou une expression par ligne[%END%]
  • +
  • [%|loc%]Le caractère # introduit un commentaire[%END%]
  • +
  • [%|loc%]Le caractère * reconnaît tous les chaînes de caractères. Par exemple : "*@exemple.com" reconnaît tous les expéditeurs depuis le domain "exemple.com"[%END%]
  • +
  • [%|loc%]Un seul caractère * n'est accepté par ligne[%END%]
  • +
  • [%|loc%]Ne pas utiliser de barre verticale, de crochets ou d'accolades dans l'expression[%END%]
  • +
+

+[% IF x_rows < 1 %] + [%|loc%]La liste est actuellement vide[%END%] +[% ELSE %] + [%|loc(x_rows)%]La liste contient actuellement %1 ligne·s[%END%] +[% END %] +

+ +[% IF x_rows < 10 %] [% x_rows = 10 %] [% END %] +[% IF x_rows > 20 %] [% x_rows = 20 %] [% END %] +[% x_rows = x_rows+2 %] +
+
+ + + + +[% IF list %] + +[% END %] + + +
+
+[% IF x_saveerror %] +Impossible de sauvegarder les données de la [% x_name %] ! ERREUR : [% x_saveerror %] +[% ELSE %] +[% IF x_saved && x_saved > 0 %] +[%|loc(x_ucfname) %] %1 data ont bien été enregistrées ![%END%] ([% time %]) +[% END %] +[% END %] + +
+
+
+ +[% ELSE %] +Vous n'avez pas le droit de modifier cette liste. +[% END %] + +
+