Commit d7035be2 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Missing {quiet} and {force} attributes, and documentation.

parent 08eced98
......@@ -7111,6 +7111,7 @@ sub do_import {
action => 'import',
dump => $content,
sender => $param->{'user'}{'email'},
quiet => $param->{'quiet'},
md5_check => 1,
scenario_context => {
sender => $param->{'user'}{'email'},
......@@ -7169,6 +7170,7 @@ sub do_add {
action => 'add',
email => $email,
sender => $param->{'user'}{'email'},
quiet => $param->{'quiet'},
md5_check => 1,
scenario_context => {
email => $email,
......@@ -7235,6 +7237,7 @@ sub do_del {
action => 'del',
email => $email,
sender => $param->{'user'}{'email'},
quiet => $param->{'quiet'},
md5_check => 1,
scenario_context => {
email => $email,
......
......@@ -197,6 +197,11 @@ users will be added even if the list is closed.
I<Optional>.
Display name of the user to be added.
=item {quiet}
I<Optional>.
Don't notify addition to the user.
=back
=head1 SEE ALSO
......
......@@ -67,16 +67,19 @@ sub _twist {
return undef;
}
# If a list is not 'open' and allow_subscribe_if_pending has been set to
# 'off' returns undef.
unless ($list->{'admin'}{'status'} eq 'open'
or
Conf::get_robot_conf($list->{'domain'}, 'allow_subscribe_if_pending')
eq 'on') {
$self->add_stash($request, 'user', 'list_not_open',
{'status' => $list->{'admin'}{'status'}});
$log->syslog('info', 'List %s not open', $list);
return undef;
unless ($request->{force}) {
# If a list is not 'open' and allow_subscribe_if_pending has been set
# to 'off' returns undef.
unless (
$list->{'admin'}{'status'} eq 'open'
or Conf::get_robot_conf($list->{'domain'},
'allow_subscribe_if_pending') eq 'on'
) {
$self->add_stash($request, 'user', 'list_not_open',
{'status' => $list->{'admin'}{'status'}});
$log->syslog('info', 'List %s not open', $list);
return undef;
}
}
# Really delete and rewrite to disk.
......@@ -154,6 +157,30 @@ Removes a user from a list (requested by another user).
Verifies the authorization and sends acknowledgements
unless quiet is specified.
=head2 Attributes
See also L<Sympa::Request::Handler/"Attributes">.
=over
=item {email}
I<Mandatory>.
E-mail of the user to be deleted.
=item {force}
I<Optional>.
If true value is specified,
users will be deleted even if the list is closed.
=item {quiet}
I<Optional>.
Don't notify addition to the user.
=back
=head1 SEE ALSO
L<Sympa::Request::Handler>.
......
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