Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

Commit

Permalink
[-change] Renaming Sympa::Spool::Request to Sympa::Spool::Auth.
Browse files Browse the repository at this point in the history
git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12662 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
  • Loading branch information
sikeda committed Jan 31, 2016
1 parent 8e4c5af commit 7776ff0
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 48 deletions.
28 changes: 14 additions & 14 deletions src/cgi/wwsympa.fcgi.in
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'},
Expand Down Expand Up @@ -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'},
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,27 @@ 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 \
Sympa/Spindle/ToList.pm \
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 \
Sympa/Spool/Digest/Collection.pm \
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 \
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Sympa/Internals/Workflow.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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]
:
Expand Down
8 changes: 4 additions & 4 deletions src/lib/Sympa/List.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Sympa/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -211,7 +211,7 @@ Display name of user sending request.
=head1 SEE ALSO
L<Sympa::Spool::Request>.
L<Sympa::Spool::Auth>.
=head1 HISTORY
Expand Down
8 changes: 4 additions & 4 deletions src/lib/Sympa/SOAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Sympa/Spindle/AuthorizeRequest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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'}});
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Sympa/Spindle/DispatchRequest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
15 changes: 8 additions & 7 deletions src/lib/Sympa/Spool/Request.pm → src/lib/Sympa/Spool/Auth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -96,29 +96,29 @@ __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;
$spool->remove($handle);
=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
Expand Down Expand Up @@ -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
Loading

0 comments on commit 7776ff0

Please sign in to comment.