Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

[PATCH] PerlAuthzHandler

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


geoff at modperlcookbook

Oct 14, 2002, 9:15 AM

Post #1 of 2 (655 views)
Permalink
[PATCH] PerlAuthzHandler

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


geoff at modperlcookbook

Oct 14, 2002, 9:28 AM

Post #2 of 2 (642 views)
Permalink
Re: [PATCH] PerlAuthzHandler [In reply to]

scratch that - I see how it works now.

geez, this test autogenerate stuff is confusing :)

sorry for the waste of bandwidth...

Geoffrey Young wrote:
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.