summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-12-30 03:07:54 +0000
committerfukachan <fukachan>2003-12-30 03:07:54 +0000
commitbbf2879febd6229727d6f42a7586113c145ef60a (patch)
treeed051d184531d44d5e2ab94ec8bd3f00824aa280
parent60d23319f88e46922fd9e048a016f604f9683d0f (diff)
downloadfml8-bbf2879febd6229727d6f42a7586113c145ef60a.tar.gz
fml8-bbf2879febd6229727d6f42a7586113c145ef60a.tar.bz2
fml8-bbf2879febd6229727d6f42a7586113c145ef60a.zip
update comments on $primary_*_map use.
use $curproc->{ credential } not call "use FML::Credential ...".
-rw-r--r--fml/lib/FML/Command/User/chaddr.pm12
-rw-r--r--fml/lib/FML/Command/User/confirm.pm10
-rw-r--r--fml/lib/FML/Command/User/digest.pm12
-rw-r--r--fml/lib/FML/Command/User/off.pm22
-rw-r--r--fml/lib/FML/Command/User/on.pm22
-rw-r--r--fml/lib/FML/Command/User/unsubscribe.pm11
6 files changed, 56 insertions, 33 deletions
diff --git a/fml/lib/FML/Command/User/chaddr.pm b/fml/lib/FML/Command/User/chaddr.pm
index 66cf9f55..7126672e 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.23 2003/10/17 14:00:52 fukachan Exp $
+# $FML: chaddr.pm,v 1.24 2003/11/22 05:41:51 fukachan Exp $
#
package FML::Command::User::chaddr;
@@ -75,9 +75,13 @@ sub process
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- #
- # XXX-TODO: correct to use *_maps not primary_*_map for chaddr?
- #
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
diff --git a/fml/lib/FML/Command/User/confirm.pm b/fml/lib/FML/Command/User/confirm.pm
index 6002b102..d94ed669 100644
--- a/fml/lib/FML/Command/User/confirm.pm
+++ b/fml/lib/FML/Command/User/confirm.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: confirm.pm,v 1.25 2003/11/17 13:06:12 fukachan Exp $
+# $FML: confirm.pm,v 1.26 2003/11/22 05:41:51 fukachan Exp $
#
package FML::Command::User::confirm;
@@ -83,7 +83,13 @@ sub process
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- # XXX-TODO: correct we handle only primary_*_map here?
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm
index 3374640d..40293687 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.7 2003/08/23 07:24:44 fukachan Exp $
+# $FML: digest.pm,v 1.8 2003/08/29 15:34:00 fukachan Exp $
#
package FML::Command::User::digest;
@@ -70,9 +70,13 @@ sub process
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- #
- # XXX-TODO: correct to use primary_*_map for chaddr ?
- #
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
diff --git a/fml/lib/FML/Command/User/off.pm b/fml/lib/FML/Command/User/off.pm
index 8cf3db33..01c342a1 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.11 2003/08/29 15:34:00 fukachan Exp $
+# $FML: off.pm,v 1.12 2003/11/22 05:41:51 fukachan Exp $
#
package FML::Command::User::off;
@@ -70,25 +70,27 @@ sub lock_channel { return 'command_serialize';}
sub process
{
my ($self, $curproc, $command_args) = @_;
- my $config = $curproc->config();
-
- #
- # XXX-TODO: correct to use primary_*_map for on/off ?
- #
+ my $config = $curproc->config();
+ my $cred = $curproc->{ credential };
+
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
my $keyword = $config->{ confirm_command_prefix };
my $command = $command_args->{ command };
- my $address = $curproc->{ credential }->sender();
+ my $address = $cred->sender();
# cheap sanity checks
croak("\$member_map is not specified") unless $member_map;
croak("\$recipient_map is not specified") unless $recipient_map;
- use FML::Credential;
- my $cred = new FML::Credential $curproc;
-
# if not member, off request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
diff --git a/fml/lib/FML/Command/User/on.pm b/fml/lib/FML/Command/User/on.pm
index 35128b6f..57c54349 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.11 2003/08/29 15:34:00 fukachan Exp $
+# $FML: on.pm,v 1.12 2003/11/22 05:41:51 fukachan Exp $
#
package FML::Command::User::on;
@@ -70,25 +70,27 @@ sub lock_channel { return 'command_serialize';}
sub process
{
my ($self, $curproc, $command_args) = @_;
- my $config = $curproc->config();
-
- #
- # XXX-TODO: correct to use primary_*_map for on/off ?
- #
+ my $config = $curproc->config();
+ my $cred = $curproc->{ credential };
+
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };
my $keyword = $config->{ confirm_command_prefix };
my $command = $command_args->{ command };
- my $address = $curproc->{ credential }->sender();
+ my $address = $cred->sender();
# fundamental check
croak("\$member_map is not specified") unless $member_map;
croak("\$recipient_map is not specified") unless $recipient_map;
- use FML::Credential;
- my $cred = new FML::Credential $curproc;
-
# if not member, on request is wrong.
unless ($cred->is_member($address)) {
$curproc->reply_message_nl('error.not_member');
diff --git a/fml/lib/FML/Command/User/unsubscribe.pm b/fml/lib/FML/Command/User/unsubscribe.pm
index 6a17305a..63a6bd18 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.22 2003/08/29 15:34:01 fukachan Exp $
+# $FML: unsubscribe.pm,v 1.23 2003/11/22 05:41:51 fukachan Exp $
#
package FML::Command::User::unsubscribe;
@@ -71,8 +71,13 @@ sub process
my ($self, $curproc, $command_args) = @_;
my $config = $curproc->config();
- # XXX-TODO: wrong to handle only primary_*_map in deluser phase.
- # XXX-TODO: we should check all maps?
+ # XXX We should always add/rewrite only $primary_*_map maps via
+ # XXX command mail, CUI and GUI.
+ # XXX Rewriting of maps not $primary_*_map is
+ # XXX 1) may be not writable.
+ # XXX 2) ambigous and dangerous
+ # XXX since the map is under controlled by other module.
+ # XXX for example, one of member_maps is under admin_member_maps.
my $member_map = $config->{ primary_member_map };
my $recipient_map = $config->{ primary_recipient_map };
my $cache_dir = $config->{ db_dir };