
geoff at modperlcookbook
Oct 14, 2002, 9:15 AM
Post #1 of 2
(655 views)
Permalink
|
hi... I found it strange that hooks/authz.t didn't actually test the PerlAuthzHandler - shuffling the test so that it actually tests the hook in question is probably better (in theory at least :) --Geoff Index: t/hooks/TestHooks/authz.pm =================================================================== RCS file: /home/cvspublic/modperl-2.0/t/hooks/TestHooks/authz.pm,v retrieving revision 1.2 diff -u -r1.2 authz.pm --- t/hooks/TestHooks/authz.pm 11 Apr 2002 11:08:43 -0000 1.2 +++ t/hooks/TestHooks/authz.pm 14 Oct 2002 16:11:01 -0000 @@ -21,7 +21,7 @@ return Apache::OK; } -sub handler { +sub authorize { my $r = shift; my $user = $r->user; @@ -32,7 +32,11 @@ return Apache::AUTH_REQUIRED unless grep { $_ eq $user } @allowed; - Apache::OK; + return Apache::OK; +} + +sub handler { + return Apache::OK; } 1; @@ -41,5 +45,6 @@ AuthType Basic AuthName simple PerlAuthenHandler TestHooks::authz::auth_any +PerlAuthzHandler TestHooks::authz::authorize PerlResponseHandler Apache::TestHandler::ok1 SetHandler modperl --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe [at] perl For additional commands, e-mail: dev-help [at] perl
|