summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-08-26 08:11:47 +0000
committerfukachan <fukachan>2001-08-26 08:11:47 +0000
commitcbbf9010aa936728cba61361392e7935307d1031 (patch)
treeafdcc98148b6d8eff24931ec142bd7b85d7a00ae /fml/lib/FML/Command
parent27615774407c06a297099652578e4a4c23ec34c9 (diff)
downloadfml8-cbbf9010aa936728cba61361392e7935307d1031.tar.gz
fml8-cbbf9010aa936728cba61361392e7935307d1031.tar.bz2
fml8-cbbf9010aa936728cba61361392e7935307d1031.zip
deny ordinary user to use this operation
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/User/edit.pm93
-rw-r--r--fml/lib/FML/Command/User/newml.pm92
2 files changed, 0 insertions, 185 deletions
diff --git a/fml/lib/FML/Command/User/edit.pm b/fml/lib/FML/Command/User/edit.pm
deleted file mode 100644
index 8388d06f..00000000
--- a/fml/lib/FML/Command/User/edit.pm
+++ /dev/null
@@ -1,93 +0,0 @@
-#-*- perl -*-
-#
-# Copyright (C) 2001 Ken'ichi Fukamachi
-# All rights reserved. This program is free software; you can
-# redistribute it and/or modify it under the same terms as Perl itself.
-#
-# $FML: edit.pm,v 1.1.1.1 2001/08/26 05:43:10 fukachan Exp $
-#
-
-package FML::Command::User::edit;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-use ErrorStatus;
-use FML::Command::Utils;
-@ISA = qw(FML::Command::Utils ErrorStatus);
-
-=head1 NAME
-
-FML::Command::User::edit - edit a new member
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-See C<FML::Command> for more details.
-
-=head1 METHODS
-
-=head1 METHODS
-
-=head2 C<process($curproc, $optargs)>
-
-C<TODO>:
-now we can read and write config.cf, not change it.
-
-=cut
-
-
-# Descriptions: edit config.cf
-# Arguments: $self $curproc $optargs
-# Side Effects: update config.cf
-# Return Value: none
-sub process
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $options = $optargs->{ options };
- my $address = $optargs->{ address } || $options->[ 0 ];
- my $myname = $optargs->{ args }->{ myname };
-
- # ML's home directory
- my $ml_home_dir = $optargs->{ 'args' }->{ 'ml_home_dir' };
- my $config_cf = $ml_home_dir."/config.cf";
-
- use FML::Config;
- my $c = new FML::Config;
-
- # read configuration. configuration is holded in FML:Config space.
- $c->read( $config_cf );
-
- # modify $c (config) object
- # XXX TODO
- # XXX ... snip ...
- # $c->set('key', 'value'); # set up
- # $c->regist('key'); # add list to write into config.cf
-
- # ovewrite $config_cf
- # after old $config_cf is backup'ed to $config_cf.bak
- $c->write( $config_cf );
-}
-
-
-=head1 AUTHOR
-
-Ken'ichi Fukamachi
-
-=head1 COPYRIGHT
-
-Copyright (C) 2001 Ken'ichi Fukamachi
-
-All rights reserved. This program is free software; you can
-redistribute it and/or modify it under the same terms as Perl itself.
-
-=head1 HISTORY
-
-FML::Command::User::edit appeared in fml5 mailing list driver package.
-See C<http://www.fml.org/> for more details.
-
-=cut
-
-
-1;
diff --git a/fml/lib/FML/Command/User/newml.pm b/fml/lib/FML/Command/User/newml.pm
deleted file mode 100644
index 7008f27b..00000000
--- a/fml/lib/FML/Command/User/newml.pm
+++ /dev/null
@@ -1,92 +0,0 @@
-#-*- perl -*-
-#
-# Copyright (C) 2001 Ken'ichi Fukamachi
-# All rights reserved. This program is free software; you can
-# redistribute it and/or modify it under the same terms as Perl itself.
-#
-# $FML: newml.pm,v 1.1.1.1 2001/08/26 05:43:10 fukachan Exp $
-#
-
-package FML::Command::User::newml;
-use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
-use Carp;
-
-use ErrorStatus;
-use FML::Command::Utils;
-@ISA = qw(FML::Command::Utils ErrorStatus);
-
-
-=head1 NAME
-
-FML::Command::User::newml - make a new mailing list
-
-=head1 SYNOPSIS
-
- use FML::Command::User::newml;
- $obj = new FML::Command::User::newml;
- $obj->newml($curproc, $optargs);
-
-See C<FML::Command> for more details.
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=head2 C<newml($curproc, $optargs)>
-
-=cut
-
-
-sub process
-{
- my ($self, $curproc, $optargs) = @_;
- my $config = $curproc->{ config };
- my $main_cf = $curproc->{ main_cf };
- my $member_map = $config->{ primary_member_map };
- my $recipient_map = $config->{ primary_recipient_map };
- my $ml_name = $optargs->{ ml_name };
-
- # fundamental check
- croak("\$ml_name is not specified") unless $ml_name;
-
- my $ml_home_prefix = $main_cf->{ ml_home_prefix };
- my $ml_home_dir = "$ml_home_prefix/$ml_name";
-
- use File::Utils qw(mkdirhier copy);
- unless (-d $ml_home_dir) {
- mkdirhier( $ml_home_dir, $config->{ default_dir_mode } || 0755 );
-
- use File::Spec;
-
- my $default_config_dir = $main_cf->{ default_config_dir };
- my $src = File::Spec->catfile($default_config_dir, "config.cf");
- my $dst = File::Spec->catfile($ml_home_dir, 'config.cf');
- copy($src, $dst);
- }
- else {
- warn("$ml_name already exists");
- }
-}
-
-
-=head1 AUTHOR
-
-Ken'ichi Fukamachi
-
-=head1 COPYRIGHT
-
-Copyright (C) 2001 Ken'ichi Fukamachi
-
-All rights reserved. This program is free software; you can
-redistribute it and/or modify it under the same terms as Perl itself.
-
-=head1 HISTORY
-
-FML::Command::User::newml appeared in fml5 mailing list driver package.
-See C<http://www.fml.org/> for more details.
-
-=cut
-
-
-1;