Unverified Commit c95fd286 authored by Luc Didry's avatar Luc Didry Committed by GitHub
Browse files

Merge pull request #790 from ldidry/add-notify-to-command-line

Add option to notify lists’ owners when opening lists from command line
parents edd0131a 2e53d99b
......@@ -87,7 +87,8 @@ unless (
'send_digest', 'keep_digest',
'upgrade_config_location', 'role=s',
'dump_users', 'restore_users',
'open_list=s', 'show_pending_lists=s'
'open_list=s', 'show_pending_lists=s',
) {
pod2usage(-exitval => 1, -output => \*STDERR);
......@@ -1081,11 +1082,13 @@ elsif ($main::options{'sync_list_db'}) {
my $mode = 'open';
$mode = 'install' if $current_list->{'admin'}{'status'} eq 'pending';
my $notify = $main::options{'notify'} // 0;
my $spindle = Sympa::Spindle::ProcessRequest->new(
context => $robot_id,
action => 'open_list',
mode => $mode,
notify => $notify,
current_list => $current_list,
sender => Sympa::get_address($robot_id, 'listmaster'),
scenario_context => {skip => 1},
......@@ -1285,7 +1288,7 @@ S<[ C<-l, --lang>=I<lang> ]> S<[ C<-m, --mail> ]>
S<[ C<-h, --help> ]> S<[ C<-v, --version> ]>
S<[ C<--import>=I<listname> ]>
S<[ C<--open_list>=I<list>[I<@robot>] ]>
S<[ C<--open_list>=I<list>[I<@robot>] [--notify] ]>
S<[ C<--close_list>=I<list>[I<@robot>] ]>
S<[ C<--purge_list>=I<list>[I<@robot>] ]>
S<[ C<--lowercase> ]> S<[ C<--make_alias_file> ]>
......@@ -1445,11 +1448,13 @@ C<--input_file=>I</path/to/file.xml>
Modify the existing list installed under the robot robot_name and that
belongs to the family family_name. The new description is in the C<file.xml>.
=item C<--open_list=>I<list>[I<@robot>]
=item C<--open_list=>I<list>[I<@robot>] [--notify]
Restore the closed list (changing its status to open), add aliases and restore
users to DB (dump files in the list directory are imported).
The C<--notify> is optional. If present, the owner(s) of the list will be notified.
=item C<--purge_list>=I<list>[@I<robot>]
Remove the list (remove archive, configuration files, users and owners in admin table. Restore is not possible after this operation.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment