Author: jkaluza
Date: Wed Feb 20 15:04:04 2013
New Revision: 1448209

URL: http://svn.apache.org/r1448209
Log:
* t/hooks/TestHooks/authz.pm: Hardcode "dougm" username, because we don't
  have access to ap_requires in httpd-2.4. Another way could be to create
  new auth provider, but that's already tested in access2.t


Modified:
    perl/modperl/branches/httpd24/t/hooks/TestHooks/authz.pm

Modified: perl/modperl/branches/httpd24/t/hooks/TestHooks/authz.pm
URL: 
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/t/hooks/TestHooks/authz.pm?rev=1448209&r1=1448208&r2=1448209&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/t/hooks/TestHooks/authz.pm (original)
+++ perl/modperl/branches/httpd24/t/hooks/TestHooks/authz.pm Wed Feb 20 
15:04:04 2013
@@ -8,6 +8,7 @@ use Apache2::Access ();
 use Apache2::Const -compile => qw(OK HTTP_UNAUTHORIZED);
 
 sub auth_any {
+    my $self = shift;
     my $r = shift;
 
     my ($res, $sent_pw) = $r->get_basic_auth_pw;
@@ -30,9 +31,7 @@ sub handler {
 
     return Apache2::Const::HTTP_UNAUTHORIZED unless $user;
 
-    my ($u, @allowed) = split /\s+/, $r->requires->[0]->{requirement};
-
-    return Apache2::Const::HTTP_UNAUTHORIZED unless grep { $_ eq $user } 
@allowed;
+    return Apache2::Const::HTTP_UNAUTHORIZED unless "dougm" eq $user;
 
     Apache2::Const::OK;
 }
@@ -43,6 +42,6 @@ require user dougm
 AuthType Basic
 AuthName simple
 PerlModule          TestHooks::authz
-PerlAuthenHandler   TestHooks::authz::auth_any
+PerlAuthenHandler   TestHooks::authz->auth_any
 PerlResponseHandler Apache::TestHandler::ok1
 SetHandler modperl


Reply via email to