diff options
| author | fukachan <fukachan> | 2008-06-28 20:06:21 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2008-06-28 20:06:21 +0000 |
| commit | 0259c9baecea6290c470bc3aecb2d20541a752dd (patch) | |
| tree | 1007b6674f9cb67b630759b79d48ed3d745ee672 | |
| parent | c60f8bcc4cedfd173d9a210a63172a86cd1d1953 (diff) | |
| download | fml8-0259c9baecea6290c470bc3aecb2d20541a752dd.tar.gz fml8-0259c9baecea6290c470bc3aecb2d20541a752dd.tar.bz2 fml8-0259c9baecea6290c470bc3aecb2d20541a752dd.zip | |
implement permit_ml_domain()
| -rw-r--r-- | fml/lib/FML/Restriction/Post.pm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/fml/lib/FML/Restriction/Post.pm b/fml/lib/FML/Restriction/Post.pm index a0bb71c7..91283423 100644 --- a/fml/lib/FML/Restriction/Post.pm +++ b/fml/lib/FML/Restriction/Post.pm @@ -1,10 +1,10 @@ #-*- perl -*- # -# Copyright (C) 2003,2004,2005,2006 Ken'ichi Fukamachi +# Copyright (C) 2003,2004,2005,2006,2008 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: Post.pm,v 1.26 2006/04/10 13:08:52 fukachan Exp $ +# $FML: Post.pm,v 1.27 2006/05/09 12:30:05 fukachan Exp $ # package FML::Restriction::Post; @@ -111,6 +111,25 @@ sub permit_anyone } +# Descriptions: permit if the domain of the sender mathces exact $ml_domain. +# Arguments: OBJ($self) STR($rule) STR($sender) +# Side Effects: none +# Return Value: ARRAY(STR, STR) +sub permit_ml_domain +{ + my ($self, $rule, $sender) = @_; + my $curproc = $self->{ _curproc }; + my $cred = $curproc->credential(); + + if ($cred->is_ml_domain($sender)) { + return("matched", "permit"); + } + else { + return(0, undef); + } +} + + # Descriptions: permit if $sender is an ML member. # Arguments: OBJ($self) STR($rule) STR($sender) # Side Effects: none @@ -427,7 +446,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2003,2004,2005,2006 Ken'ichi Fukamachi +Copyright (C) 2003,2004,2005,2006,2008 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. |
