summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-11-30 23:30:38 +0000
committerfukachan <fukachan>2005-11-30 23:30:38 +0000
commitb2ec034ac5748f97a2cbb0e811c355312e31c605 (patch)
tree341b2b814ec6330230f7460db287c79e7ff93f65
parent8739d241ca3947fe11d625d30f752fe3e6552aeb (diff)
downloadfml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.tar.gz
fml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.tar.bz2
fml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.zip
use $curproc->credential();
-rw-r--r--fml/lib/FML/Command/Admin/addmember.pm4
-rw-r--r--fml/lib/FML/Command/Admin/addrecipient.pm4
-rw-r--r--fml/lib/FML/Command/Admin/changepassword.pm6
-rw-r--r--fml/lib/FML/Command/Admin/digest.pm6
-rw-r--r--fml/lib/FML/Command/Admin/off.pm4
-rw-r--r--fml/lib/FML/Command/Admin/on.pm4
-rw-r--r--fml/lib/FML/Command/Auth.pm10
-rw-r--r--fml/lib/FML/Command/User/admin.pm4
-rw-r--r--fml/lib/FML/Command/User/chaddr.pm4
-rw-r--r--fml/lib/FML/Command/User/digest.pm7
-rw-r--r--fml/lib/FML/Command/User/off.pm4
-rw-r--r--fml/lib/FML/Command/User/on.pm4
-rw-r--r--fml/lib/FML/Command/User/subscribe.pm4
-rw-r--r--fml/lib/FML/Command/User/unsubscribe.pm4
-rw-r--r--fml/lib/FML/Error.pm6
-rw-r--r--fml/lib/FML/Filter.pm4
-rw-r--r--fml/lib/FML/ML/HomePrefix.pm4
-rw-r--r--fml/lib/FML/Process/Command.pm6
-rw-r--r--fml/lib/FML/Process/Distribute.pm7
-rw-r--r--fml/lib/FML/Process/Kernel.pm23
-rw-r--r--fml/lib/FML/Process/QueueManager.pm4
-rw-r--r--fml/lib/FML/Restriction/Command.pm4
-rw-r--r--fml/lib/FML/Restriction/Post.pm6
23 files changed, 70 insertions, 63 deletions
diff --git a/fml/lib/FML/Command/Admin/addmember.pm b/fml/lib/FML/Command/Admin/addmember.pm
index 0719aea5..8da40bda 100644
--- a/fml/lib/FML/Command/Admin/addmember.pm
+++ b/fml/lib/FML/Command/Admin/addmember.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: addmember.pm,v 1.4 2005/08/17 10:36:37 fukachan Exp $
+# $FML: addmember.pm,v 1.5 2005/08/17 12:08:45 fukachan Exp $
#
package FML::Command::Admin::addmember;
@@ -81,7 +81,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $options = $command_args->{ options };
my $address = $command_args->{ command_data } || $options->[ 0 ];
diff --git a/fml/lib/FML/Command/Admin/addrecipient.pm b/fml/lib/FML/Command/Admin/addrecipient.pm
index 993eae85..eb362ece 100644
--- a/fml/lib/FML/Command/Admin/addrecipient.pm
+++ b/fml/lib/FML/Command/Admin/addrecipient.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: addrecipient.pm,v 1.4 2005/08/17 10:36:36 fukachan Exp $
+# $FML: addrecipient.pm,v 1.5 2005/08/17 12:08:43 fukachan Exp $
#
package FML::Command::Admin::addrecipient;
@@ -81,7 +81,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $options = $command_args->{ options };
my $address = $command_args->{ command_data } || $options->[ 0 ];
diff --git a/fml/lib/FML/Command/Admin/changepassword.pm b/fml/lib/FML/Command/Admin/changepassword.pm
index 05081a99..d0a031a9 100644
--- a/fml/lib/FML/Command/Admin/changepassword.pm
+++ b/fml/lib/FML/Command/Admin/changepassword.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: changepassword.pm,v 1.15 2004/07/23 13:03:50 fukachan Exp $
+# $FML: changepassword.pm,v 1.16 2005/05/27 03:03:34 fukachan Exp $
#
package FML::Command::Admin::changepassword;
@@ -125,7 +125,7 @@ sub process
# XXX-TODO really ???
# XXX special treatment only for command mails.
if ($myname eq 'command' || $myname eq 'fml.pl') {
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
$address = $cred->sender(); # From: in the header
$password = $options->[ 0 ];
}
@@ -166,7 +166,7 @@ sub _change_password
{
my ($self, $curproc, $command_args, $address, $password) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Command/Admin/digest.pm b/fml/lib/FML/Command/Admin/digest.pm
index fcf0cb54..20acf3f7 100644
--- a/fml/lib/FML/Command/Admin/digest.pm
+++ b/fml/lib/FML/Command/Admin/digest.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: digest.pm,v 1.23 2005/08/17 10:36:36 fukachan Exp $
+# $FML: digest.pm,v 1.24 2005/08/17 12:08:43 fukachan Exp $
#
package FML::Command::Admin::digest;
@@ -158,7 +158,7 @@ sub _digest_on
{
my ($self, $curproc, $command_args, $dargs) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $address = $dargs->{ address };
my $recipient_map = $dargs->{ primary_recipient_map };
my $digest_recipient_map = $dargs->{ primary_digest_recipient_map };
@@ -216,7 +216,7 @@ sub _digest_off
{
my ($self, $curproc, $command_args, $dargs) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $address = $dargs->{ address };
my $recipient_map = $dargs->{ primary_recipient_map };
my $digest_recipient_map = $dargs->{ primary_digest_recipient_map };
diff --git a/fml/lib/FML/Command/Admin/off.pm b/fml/lib/FML/Command/Admin/off.pm
index 95468ead..295476de 100644
--- a/fml/lib/FML/Command/Admin/off.pm
+++ b/fml/lib/FML/Command/Admin/off.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: off.pm,v 1.22 2005/08/17 10:36:36 fukachan Exp $
+# $FML: off.pm,v 1.23 2005/08/17 12:08:44 fukachan Exp $
#
package FML::Command::Admin::off;
@@ -81,7 +81,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $options = $command_args->{ options } || [];
my $address = $command_args->{ command_data } || $options->[ 0 ];
diff --git a/fml/lib/FML/Command/Admin/on.pm b/fml/lib/FML/Command/Admin/on.pm
index 8837ad43..2f1e14a9 100644
--- a/fml/lib/FML/Command/Admin/on.pm
+++ b/fml/lib/FML/Command/Admin/on.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: on.pm,v 1.22 2005/08/17 10:36:36 fukachan Exp $
+# $FML: on.pm,v 1.23 2005/08/17 12:08:44 fukachan Exp $
#
package FML::Command::Admin::on;
@@ -81,7 +81,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $options = $command_args->{ options } || [];
my $address = $command_args->{ command_data } || $options->[ 0 ] || '';
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm
index 3db3e48f..f0182730 100644
--- a/fml/lib/FML/Command/Auth.pm
+++ b/fml/lib/FML/Command/Auth.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Auth.pm,v 1.39 2004/12/05 16:19:06 fukachan Exp $
+# $FML: Auth.pm,v 1.40 2005/05/26 09:46:01 fukachan Exp $
#
package FML::Command::Auth;
@@ -80,7 +80,7 @@ sub permit_anyone
sub permit_admin_member_maps
{
my ($self, $curproc, $optargs) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $match = $cred->is_privileged_member($sender);
@@ -100,7 +100,7 @@ sub permit_admin_member_maps
sub reject_system_special_accounts
{
my ($self, $curproc, $optargs) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $match = $cred->match_system_special_accounts($sender);
@@ -130,7 +130,7 @@ sub check_admin_member_password
{
my ($self, $curproc, $optargs) = @_;
my $function = "check_admin_member_password";
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $config = $curproc->config();
my $status = 0;
@@ -245,7 +245,7 @@ sub check_admin_member_password
sub change_password
{
my ($self, $curproc, $command_args, $up_args) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $map = $up_args->{ map };
my $address = $up_args->{ address };
my $password = $up_args->{ password };
diff --git a/fml/lib/FML/Command/User/admin.pm b/fml/lib/FML/Command/User/admin.pm
index 584c639f..e9affb4e 100644
--- a/fml/lib/FML/Command/User/admin.pm
+++ b/fml/lib/FML/Command/User/admin.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: admin.pm,v 1.12 2005/05/30 03:28:06 fukachan Exp $
+# $FML: admin.pm,v 1.13 2005/05/30 06:52:23 fukachan Exp $
#
package FML::Command::User::admin;
@@ -153,7 +153,7 @@ sub process
sub _try_admin_auth
{
my ($self, $curproc, $command_args) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $opt_args = { address => $sender };
my $class = $command_args->{ comsubname } || '';
diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm
index 1fc4b844..9e21aa8f 100644
--- a/fml/lib/FML/Command/User/chaddr.pm
+++ b/fml/lib/FML/Command/User/chaddr.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: chaddr.pm,v 1.31 2004/06/26 11:47:57 fukachan Exp $
+# $FML: chaddr.pm,v 1.32 2004/06/27 07:56:17 fukachan Exp $
#
package FML::Command::User::chaddr;
@@ -119,7 +119,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm
index 64c1bd2a..2ea5cde4 100644
--- a/fml/lib/FML/Command/User/digest.pm
+++ b/fml/lib/FML/Command/User/digest.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: digest.pm,v 1.13 2004/04/23 04:10:32 fukachan Exp $
+# $FML: digest.pm,v 1.14 2004/06/29 10:02:43 fukachan Exp $
#
package FML::Command::User::digest;
@@ -68,7 +68,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
@@ -82,7 +82,8 @@ sub process
my $cache_dir = $config->{ db_dir };
my $keyword = $config->{ confirm_command_prefix };
my $command = $command_args->{ command };
- my $address = $curproc->{ credential }->sender();
+ my $cred = $curproc->credential();
+ my $address = $cred->sender();
my $mode = '';
# fundamental check
diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm
index 40c981cb..9102a1c7 100644
--- a/fml/lib/FML/Command/User/off.pm
+++ b/fml/lib/FML/Command/User/off.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: off.pm,v 1.17 2004/04/23 04:10:32 fukachan Exp $
+# $FML: off.pm,v 1.18 2004/06/26 11:47:58 fukachan Exp $
#
package FML::Command::User::off;
@@ -70,7 +70,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm
index 050ff12f..150692bc 100644
--- a/fml/lib/FML/Command/User/on.pm
+++ b/fml/lib/FML/Command/User/on.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: on.pm,v 1.17 2004/04/23 04:10:32 fukachan Exp $
+# $FML: on.pm,v 1.18 2004/06/26 11:47:58 fukachan Exp $
#
package FML::Command::User::on;
@@ -70,7 +70,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Command/User/subscribe.pm b/fml/lib/FML/Command/User/subscribe.pm
index b049d33f..97921978 100644
--- a/fml/lib/FML/Command/User/subscribe.pm
+++ b/fml/lib/FML/Command/User/subscribe.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: subscribe.pm,v 1.32 2005/05/26 09:57:54 fukachan Exp $
+# $FML: subscribe.pm,v 1.33 2005/08/11 04:07:33 fukachan Exp $
#
package FML::Command::User::subscribe;
@@ -70,7 +70,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Command/User/unsubscribe.pm b/fml/lib/FML/Command/User/unsubscribe.pm
index 8979b059..0d0ba6d7 100644
--- a/fml/lib/FML/Command/User/unsubscribe.pm
+++ b/fml/lib/FML/Command/User/unsubscribe.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: unsubscribe.pm,v 1.33 2005/05/26 09:57:54 fukachan Exp $
+# $FML: unsubscribe.pm,v 1.34 2005/08/11 04:07:33 fukachan Exp $
#
package FML::Command::User::unsubscribe;
@@ -69,7 +69,7 @@ sub process
{
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# XXX We should always add/rewrite only $primary_*_map maps via
# XXX command mail, CUI and GUI.
diff --git a/fml/lib/FML/Error.pm b/fml/lib/FML/Error.pm
index 1f1a900b..ccf1a283 100644
--- a/fml/lib/FML/Error.pm
+++ b/fml/lib/FML/Error.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Error.pm,v 1.35 2005/08/17 12:08:40 fukachan Exp $
+# $FML: Error.pm,v 1.36 2005/08/20 02:16:03 fukachan Exp $
#
package FML::Error;
@@ -289,7 +289,7 @@ sub is_list_address
my ($self, $addr) = @_;
my $curproc = $self->{ _curproc };
my $config = $curproc->config();
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $addrs = $config->get_as_array_ref('list_addresses');
my $match = 0;
@@ -333,7 +333,7 @@ sub remove_bouncers
{
my ($self) = @_;
my $curproc = $self->{ _curproc };
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $list = $self->{ _list_to_be_removed };
use FML::Restriction::Base;
diff --git a/fml/lib/FML/Filter.pm b/fml/lib/FML/Filter.pm
index d4ab842f..059c2807 100644
--- a/fml/lib/FML/Filter.pm
+++ b/fml/lib/FML/Filter.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Filter.pm,v 1.46 2005/08/09 03:22:22 fukachan Exp $
+# $FML: Filter.pm,v 1.47 2005/08/19 11:18:36 fukachan Exp $
#
package FML::Filter;
@@ -452,7 +452,7 @@ sub command_mail_filter_reject_notice
sub _filter_reject_notice
{
my ($self, $curproc, $msg_args, $class) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $config = $curproc->config();
my $msg = $curproc->incoming_message();
my $r = $msg_args->{ _arg_reason } || 'unknown';
diff --git a/fml/lib/FML/ML/HomePrefix.pm b/fml/lib/FML/ML/HomePrefix.pm
index b3f25e21..c65c1662 100644
--- a/fml/lib/FML/ML/HomePrefix.pm
+++ b/fml/lib/FML/ML/HomePrefix.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: HomePrefix.pm,v 1.7 2004/10/03 12:07:52 fukachan Exp $
+# $FML: HomePrefix.pm,v 1.8 2005/05/27 03:03:35 fukachan Exp $
#
package FML::ML::HomePrefix;
@@ -101,7 +101,7 @@ sub add
{
my ($self, $domain, $dir) = @_;
my $curproc = $self->{ _curproc };
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $pri_map = $self->primary_map();
$self->_sanity_check();
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 23591905..104eca98 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004,2005 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.113 2005/06/04 08:49:08 fukachan Exp $
+# $FML: Command.pm,v 1.114 2005/08/10 15:03:24 fukachan Exp $
#
package FML::Process::Command;
@@ -347,7 +347,7 @@ sub _command_switch
my ($curproc, $context) = @_;
my $config = $curproc->config();
my $prompt = $config->{ command_mail_reply_prompt } || '>>>';
- my $cred = $curproc->{ credential }; # user credential
+ my $cred = $curproc->credential(); # user credential
my $sender = $cred->sender();
my $comname = $context->{ comname };
my $msg_args = $context->{ msg_args } || {};
@@ -422,7 +422,7 @@ sub _command_execute
my ($curproc, $command_args) = @_;
my $config = $curproc->config();
my $prompt = $config->{ command_mail_reply_prompt } || '>>>';
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $msg_args = $command_args->{ msg_args } || {};
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 6b743d24..292f1102 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004,2005 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.164 2005/09/11 13:14:15 fukachan Exp $
+# $FML: Distribute.pm,v 1.165 2005/09/14 00:02:37 fukachan Exp $
#
package FML::Process::Distribute;
@@ -216,7 +216,8 @@ sub run
my ($curproc, $args) = @_;
my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
- my $sender = $curproc->{'credential'}->{'sender'};
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender();
my $_data_type =
$config->{ article_post_restrictions_reject_notice_data_type };
my $data_type = $_data_type || 'string';
@@ -512,7 +513,7 @@ sub _header_rewrite
sub _deliver_article
{
my ($curproc) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $config = $curproc->config(); # FML::Config object
my $message = $curproc->article_message(); # Mail::Message object
my $header = $curproc->article_message_header(); # FML::Header object
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 39c29c81..c57047e6 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.267 2005/08/19 11:23:02 fukachan Exp $
+# $FML: Kernel.pm,v 1.268 2005/08/19 12:17:09 fukachan Exp $
#
package FML::Process::Kernel;
@@ -265,7 +265,7 @@ sub _credential_init
use FML::Credential;
my $cred = new FML::Credential $curproc;
- $curproc->{'credential'} = $cred;
+ $curproc->{ 'credential' } = $cred;
}
@@ -559,7 +559,7 @@ sub _init_event_timeout
=head2 credential_verify_sender($args)
validate the mail sender (From: in the header not SMTP SENEDER). If
-valid, it sets the adddress within $curproc->{ credential } object as
+valid, it sets the adddress within $curproc->credential() object as
a side effect.
=cut
@@ -609,7 +609,8 @@ sub credential_verify_sender
my $safe = new FML::Restriction::Base;
if ($safe->regexp_match('address', $from)) {
# o.k. From: is proven to be valid now.
- $curproc->{'credential'}->set( 'sender', $from );
+ my $cred = $curproc->credential();
+ $cred->set( 'sender', $from );
}
else {
$curproc->stop_this_process();
@@ -1040,7 +1041,7 @@ sub config_cf_files_load
}
use FML::Credential;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $s = "configuration error: \$maintainer == \$article_post_address";
if ($maintainer && $ml_address) {
if ($cred->is_same_address($maintainer, $ml_address)) {
@@ -1292,7 +1293,7 @@ sub is_permit_post
{
my ($curproc) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential }; # user credential
+ my $cred = $curproc->credential(); # user credential
my $sender = $cred->sender();
my $rules = $config->get_as_array_ref( "article_post_restrictions" );
@@ -1782,7 +1783,9 @@ sub _analyze_recipients
# if both specified, use default sender.
unless (@$recipient || @$recipient_maps) {
- $recipient = [ $curproc->{ credential }->sender() ];
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender();
+ $recipient = [ $sender ];
}
# aggregation of recepients: [ A, A, B ] -> [ A, B ]
@@ -2448,8 +2451,10 @@ sub queue_in
# default recipient if undefined.
unless ($rcptkey) {
- if (defined $curproc->{ credential }) {
- $rcptkey = $curproc->{ credential }->sender();
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender() || undef;
+ if (defined $cred) {
+ $rcptkey = $sender;
}
}
diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm
index 624b8296..c2c8dcad 100644
--- a/fml/lib/FML/Process/QueueManager.pm
+++ b/fml/lib/FML/Process/QueueManager.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: QueueManager.pm,v 1.35 2005/05/27 03:03:37 fukachan Exp $
+# $FML: QueueManager.pm,v 1.36 2005/06/04 01:35:25 fukachan Exp $
#
package FML::Process::QueueManager;
@@ -170,7 +170,7 @@ sub send
sub _send
{
my ($self, $curproc, $q) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $info = $q->getidinfo();
my $qfile = $info->{ 'path' };
my $qid = $info->{ 'id' };
diff --git a/fml/lib/FML/Restriction/Command.pm b/fml/lib/FML/Restriction/Command.pm
index e161c1f2..6d30fa82 100644
--- a/fml/lib/FML/Restriction/Command.pm
+++ b/fml/lib/FML/Restriction/Command.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Command.pm,v 1.18 2005/05/30 03:28:07 fukachan Exp $
+# $FML: Command.pm,v 1.19 2005/05/31 13:14:05 fukachan Exp $
#
package FML::Restriction::Command;
@@ -130,7 +130,7 @@ sub permit_admin_member_maps
{
my ($self, $rule, $sender) = @_;
my $curproc = $self->{ _curproc };
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $match = $cred->is_privileged_member($sender);
if ($match) {
diff --git a/fml/lib/FML/Restriction/Post.pm b/fml/lib/FML/Restriction/Post.pm
index 6970543b..c71576e6 100644
--- a/fml/lib/FML/Restriction/Post.pm
+++ b/fml/lib/FML/Restriction/Post.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Post.pm,v 1.19 2005/05/30 03:32:34 fukachan Exp $
+# $FML: Post.pm,v 1.20 2005/05/31 13:14:05 fukachan Exp $
#
package FML::Restriction::Post;
@@ -49,7 +49,7 @@ sub reject_system_special_accounts
{
my ($self, $rule, $sender) = @_;
my $curproc = $self->{ _curproc };
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $match = $cred->match_system_special_accounts($sender);
if ($match) {
@@ -96,7 +96,7 @@ sub permit_member_maps
{
my ($self, $rule, $sender) = @_;
my $curproc = $self->{ _curproc };
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
# Q: the mail sender is an ML member?
if ($cred->is_member($sender)) {