Commit c1d24c2e authored by sikeda's avatar sikeda
Browse files

[-change] Renaming Sympa::Spool::Request to Sympa::Spool::Auth.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12662 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 17e679ee
......@@ -76,10 +76,10 @@ use Sympa::Session;
use Sympa::SharedDocument;
use Sympa::Spindle::ResendArchive;
use Sympa::Spool::Archive;
use Sympa::Spool::Auth;
use Sympa::Spool::Held;
use Sympa::Spool::Incoming;
use Sympa::Spool::Moderation;
use Sympa::Spool::Request;
use Sympa::Template;
use Sympa::Ticket;
use tools;
......@@ -3099,11 +3099,11 @@ sub check_param_in {
if ($param->{'is_priv'}) {
$param->{'mod_message'} =
Sympa::Spool::Moderation->new(context => $list)->size;
$param->{'mod_subscription'} = Sympa::Spool::Request->new(
$param->{'mod_subscription'} = Sympa::Spool::Auth->new(
context => $list,
action => 'add'
)->size;
$param->{'mod_signoff'} = Sympa::Spool::Request->new(
$param->{'mod_signoff'} = Sympa::Spool::Auth->new(
context => $list,
action => 'del'
)->size;
......@@ -6066,7 +6066,7 @@ sub do_subscribe {
}
);
 
my $spool_req = Sympa::Spool::Request->new;
my $spool_req = Sympa::Spool::Auth->new;
my $request = Sympa::Request->new_from_tuples(
context => $list,
email => $param->{'user'}{'email'},
......@@ -6655,7 +6655,7 @@ sub unsubscribe {
}
);
 
my $spool_req = Sympa::Spool::Request->new;
my $spool_req = Sympa::Spool::Auth->new;
my $request = Sympa::Request->new_from_tuples(
context => $list,
email => $param->{'user'}{'email'},
......@@ -8191,7 +8191,7 @@ sub do_add {
 
# Delete subscription requests if any
my $spool_req =
Sympa::Spool::Request->new(context => $list, action => 'add');
Sympa::Spool::Auth->new(context => $list, action => 'add');
while (1) {
my ($request, $handle) = $spool_req->next;
last unless $handle;
......@@ -8253,7 +8253,7 @@ sub do_add_fromsub {
foreach my $id (split /\0/, $in{'id'}) {
next unless $id and $id =~ /\A\w+\z/;
 
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
authkey => $id,
action => 'add'
......@@ -8520,7 +8520,7 @@ sub do_del_fromsig {
foreach my $id (split /\0/, $in{'id'}) {
next unless $id and $id =~ /\A\w+\z/;
 
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
authkey => $id,
action => 'del'
......@@ -11401,14 +11401,14 @@ sub do_home {
$mod_message
if $mod_message;
 
my $mod_subscription = Sympa::Spool::Request->new(
my $mod_subscription = Sympa::Spool::Auth->new(
context => $one_list,
action => 'add'
)->size;
$param->{'admin_summary'}{$one_list->{'name'}}
{'mod_subscription'} = $mod_subscription
if $mod_subscription;
my $mod_signoff = Sympa::Spool::Request->new(
my $mod_signoff = Sympa::Spool::Auth->new(
context => $one_list,
action => 'del'
)->size;
......@@ -22322,7 +22322,7 @@ sub do_subindex {
wwslog('info', '');
 
my $spool_req =
Sympa::Spool::Request->new(context => $list, action => 'add');
Sympa::Spool::Auth->new(context => $list, action => 'add');
my @subscriptions;
while (1) {
my ($request, $handle) = $spool_req->next(no_lock => 1);
......@@ -22366,7 +22366,7 @@ sub do_ignoresub {
foreach my $id (split /\0/, $in{'id'}) {
next unless $id and $id =~ /\A\w+\z/;
 
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
authkey => $id,
action => 'add'
......@@ -22399,7 +22399,7 @@ sub do_sigindex {
wwslog('info', '');
 
my $spool_req =
Sympa::Spool::Request->new(context => $list, action => 'del');
Sympa::Spool::Auth->new(context => $list, action => 'del');
my @signoffs;
while (1) {
my ($request, $handle) = $spool_req->next(no_lock => 1);
......@@ -22441,7 +22441,7 @@ sub do_ignoresig {
foreach my $id (split /\0/, $in{'id'}) {
next unless $id and $id =~ /\A\w+\z/;
 
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
authkey => $id,
action => 'del'
......
......@@ -103,6 +103,7 @@ nobase_modules_DATA = \
Sympa/Spindle/ToAlarm.pm \
Sympa/Spindle/ToArchive.pm \
Sympa/Spindle/ToAuth.pm \
Sympa/Spindle/ToAuthOwner.pm \
Sympa/Spindle/ToDigest.pm \
Sympa/Spindle/ToEditor.pm \
Sympa/Spindle/ToHeld.pm \
......@@ -110,12 +111,12 @@ nobase_modules_DATA = \
Sympa/Spindle/ToMailer.pm \
Sympa/Spindle/ToModeration.pm \
Sympa/Spindle/ToOutgoing.pm \
Sympa/Spindle/ToRequest.pm \
Sympa/Spindle/TransformDigestFinal.pm \
Sympa/Spindle/TransformIncoming.pm \
Sympa/Spindle/TransformOutgoing.pm \
Sympa/Spool.pm \
Sympa/Spool/Archive.pm \
Sympa/Spool/Auth.pm \
Sympa/Spool/Automatic.pm \
Sympa/Spool/Bounce.pm \
Sympa/Spool/Digest.pm \
......@@ -123,7 +124,6 @@ nobase_modules_DATA = \
Sympa/Spool/Held.pm \
Sympa/Spool/Incoming.pm \
Sympa/Spool/Moderation.pm \
Sympa/Spool/Request.pm \
Sympa/Task.pm \
Sympa/Template.pm \
Sympa/Ticket.pm \
......
......@@ -83,7 +83,7 @@ workflow of Sympa. For more details see documentation on each class.
(message) => [ProcessMessage] /
\ /---> [ToAuth] => (authkey)
+-> [AuthorizeRequest]
\---> [ToRequest] => Request
\---> [ToAuthOwner] => Auth
\
+-> [DispatchRequest]
:
......
......@@ -8973,16 +8973,16 @@ sub select_list_members_for_topic {
#
### END - functions for message topics ###
# DEPRECATED. Use Sympa::Spool::Request::store().
# DEPRECATED. Use Sympa::Spool::Auth::store().
#sub store_subscription_request;
# DEPRECATED. Use Sympa::Spool::Request::next().
# DEPRECATED. Use Sympa::Spool::Auth::next().
#sub get_subscription_requests;
# DEPRECATED. Use Sympa::Spool::Request::size().
# DEPRECATED. Use Sympa::Spool::Auth::size().
#sub get_subscription_request_count;
# DEPRECATED. Use Sympa::Spool::Request::remove().
# DEPRECATED. Use Sympa::Spool::Auth::remove().
#sub delete_subscription_request;
sub get_shared_size {
......
......@@ -191,7 +191,7 @@ Returns serialized data of object.
Context and metadata given to constructor are accessible as hash elements
of object.
They are given by request spool.
See L<Sympa::Spool::Request/"Context and metadata"> for details.
See L<Sympa::Spool::Auth/"Context and metadata"> for details.
=head2 Attributes
......@@ -211,7 +211,7 @@ Display name of user sending request.
=head1 SEE ALSO
L<Sympa::Spool::Request>.
L<Sympa::Spool::Auth>.
=head1 HISTORY
......
......@@ -39,7 +39,7 @@ use Sympa::Request;
use Sympa::Robot;
use Sympa::Scenario;
use Sympa::Session;
use Sympa::Spool::Request;
use Sympa::Spool::Auth;
use Sympa::Template;
use tools;
use Sympa::Tools::Password;
......@@ -909,7 +909,7 @@ sub add {
->faultstring('Unable to add user')->faultdetail($error);
}
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
email => $email,
action => 'add'
......@@ -1053,7 +1053,7 @@ sub del {
->faultstring('Unable to remove subscriber information')
->faultdetail('Database access failed');
} else {
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
email => $email,
action => 'del'
......@@ -1494,7 +1494,7 @@ sub subscribe {
}
);
my $spool_req = Sympa::Spool::Request->new;
my $spool_req = Sympa::Spool::Auth->new;
my $request = Sympa::Request->new_from_tuples(
context => $list,
email => $sender,
......
......@@ -33,7 +33,7 @@ use Sympa::CommandDef;
use Sympa::Log;
use Sympa::Request;
use Sympa::Scenario;
use Sympa::Spool::Request;
use Sympa::Spool::Auth;
use base qw(Sympa::Spindle);
......@@ -133,7 +133,7 @@ sub _twist {
return ['Sympa::Spindle::ToAuth'];
} elsif ($action =~ /\Aowner\b/i and ref $that eq 'Sympa::List') {
$request->{quiet} ||= ($action =~ /,\s*quiet\b/i);
return ['Sympa::Spindle::ToRequest'];
return ['Sympa::Spindle::ToAuthOwner'];
} elsif ($action =~ /\Areject\b/i) {
$self->add_stash($request, 'auth', $result->{'reason'},
{template => $result->{'tt2'}});
......@@ -250,7 +250,7 @@ Not implemented.
L<Sympa::Request>, L<Sympa::Scenario>, L<Sympa::Spindle::DispatchRequest>,
L<Sympa::Spindle::ProcessMessage>, L<Sympa::Spindle::ProcessRequest>,
L<Sympa::Spindle::ToAuth>, L<Sympa::Spindle::ToRequest>.
L<Sympa::Spindle::ToAuth>, L<Sympa::Spindle::ToAuthOwner>.
=head1 HISTORY
......
......@@ -37,8 +37,8 @@ use Sympa::Log;
use Sympa::Scenario;
use Sympa::Spindle::ProcessHeld;
use Sympa::Spindle::ProcessModeration;
use Sympa::Spool::Auth;
use Sympa::Spool::Moderation;
use Sympa::Spool::Request;
use Sympa::Tools::Password;
use Sympa::User;
......@@ -1114,7 +1114,7 @@ sub add {
return undef;
}
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
email => $email,
action => 'add'
......@@ -1553,7 +1553,7 @@ sub del {
);
$self->add_stash($request, 'intern');
} else {
my $spool_req = Sympa::Spool::Request->new(
my $spool_req = Sympa::Spool::Auth->new(
context => $list,
email => $who,
action => 'del'
......
......@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
package Sympa::Spindle::ToRequest;
package Sympa::Spindle::ToAuthOwner;
use strict;
use warnings;
......@@ -31,7 +31,7 @@ use Time::HiRes qw();
use Sympa;
use Sympa::Log;
use Sympa::Request;
use Sympa::Spool::Request;
use Sympa::Spool::Auth;
use base qw(Sympa::Spindle);
......@@ -84,7 +84,7 @@ sub _twist {
$self->add_stash($request, 'intern');
}
my $spool_req = Sympa::Spool::Request->new;
my $spool_req = Sympa::Spool::Auth->new;
my $add_request = Sympa::Request->new_from_tuples(
action => $owner_action,
# Keep date of message.
......@@ -112,7 +112,7 @@ __END__
=head1 NAME
Sympa::Spindle::ToRequest -
Sympa::Spindle::ToAuthOwner -
Process to store requests into request spool to wait for moderation
=head1 DESCRIPTION
......@@ -123,10 +123,10 @@ TBD.
L<Sympa::Request>,
L<Sympa::Spindle>, L<Sympa::Spindle::AuthorizeRequest>,
L<Sympa::Spool::Request>.
L<Sympa::Spool::Auth>.
=head1 HISTORY
L<Sympa::Spindle::ToRequest> appeared on Sympa 6.2.13.
L<Sympa::Spindle::ToAuthOwner> appeared on Sympa 6.2.13.
=cut
......@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
package Sympa::Spool::Request;
package Sympa::Spool::Auth;
use strict;
use warnings;
......@@ -96,21 +96,21 @@ __END__
=head1 NAME
Sympa::Spool::Request - Spool for held requests waiting for moderation
Sympa::Spool::Auth - Spool for held requests waiting for moderation
=head1 SYNOPSIS
use Sympa::Spool::Request;
use Sympa::Spool::Auth;
my $spool = Sympa::Spool::Request->new;
my $spool = Sympa::Spool::Auth->new;
my $request = Sympa::Request->new(...);
$spool->store($request);
my $spool = Sympa::Spool::Request->new(
my $spool = Sympa::Spool::Auth->new(
context => $list, action => 'add');
my $size = $spool->size;
my $spool = Sympa::Spool::Request->new(
my $spool = Sympa::Spool::Auth->new(
context => $list, authkey => $id, action => 'add');
my ($request, $handle) = $spool->next;
......@@ -118,7 +118,7 @@ Sympa::Spool::Request - Spool for held requests waiting for moderation
=head1 DESCRIPTION
L<Sympa::Spool::Request> implements the spool for held requests waiting
L<Sympa::Spool::Auth> implements the spool for held requests waiting
for moderation.
=head2 Methods
......@@ -194,5 +194,6 @@ L<Sympa::Request>, L<Sympa::Spool>.
=head1 HISTORY
L<Sympa::Spool::Request> appeared on Sympa 6.2.10.
It was renamed to L<Sympa::Spool::Auth> on Sympa 6.2.13.
=cut
......@@ -45,8 +45,8 @@ use Sympa::Message;
use Sympa::Request;
use Sympa::Spool;
use Sympa::Spool::Archive;
use Sympa::Spool::Auth;
use Sympa::Spool::Digest;
use Sympa::Spool::Request;
use tools;
use Sympa::Tools::Data;
use Sympa::Tools::File;
......@@ -1756,7 +1756,7 @@ sub upgrade {
);
next unless $request;
my $spool_req = Sympa::Spool::Request->new;
my $spool_req = Sympa::Spool::Auth->new;
if ($spool_req->store($request)) {
$lock_fh->unlink;
} else {
......
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