From 26e697d5ed2da8b62f65fb2d0e284913cc27a697 Mon Sep 17 00:00:00 2001 From: fukachan Date: Tue, 28 May 2002 13:36:59 +0000 Subject: implement permit_admin_member_maps() --- fml/lib/FML/Command/Auth.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index 35f06bb1..5653182b 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.5 2002/04/10 09:57:22 fukachan Exp $ +# $FML: Auth.pm,v 1.6 2002/05/27 08:59:15 fukachan Exp $ # package FML::Command::Auth; @@ -56,6 +56,8 @@ sub new # Return Value: NUM sub reject { + my ($self, $curproc, $args, $optargs) = @_; + return '__LAST__'; } @@ -66,10 +68,25 @@ sub reject # Return Value: NUM sub permit_anyone { + my ($self, $curproc, $args, $optargs) = @_; + return 1; } +sub permit_admin_member_maps +{ + my ($self, $curproc, $args, $optargs) = @_; + my $cred = $curproc->{ credential }; + my $match = $cred->is_privileged_member($curproc, $args); + + if ($match) { + Log("found in admin_member_maps"); + return 1; + } +} + + # Descriptions: virtual reject handler, just return 0 :-) # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none -- cgit v1.2.1