Author: handyande
Date: Sun May 13 21:34:04 2007
New Revision: 537707

URL: http://svn.apache.org/viewvc?view=rev&rev=537707
Log:
Tidy a little logic and a comment

Modified:
    
maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java

Modified: 
maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java?view=diff&rev=537707&r1=537706&r2=537707
==============================================================================
--- 
maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
 (original)
+++ 
maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
 Sun May 13 21:34:04 2007
@@ -104,14 +104,14 @@
         {
             AuthenticationResult result = httpAuth.getAuthenticationResult( 
request, response );
 
-            if ( ( result == null ) || !result.isAuthenticated() )
+            if ( ( result != null ) && result.isAuthenticated() )
             {
-                httpAuth.challenge( request, response, "Enterprise Repository",
-                                    new AuthenticationException( "User 
credentials are invalid" ) );
-                return false;
+                return true;
             }
 
-            return true;
+            httpAuth.challenge( request, response, "Enterprise Repository",
+                                new AuthenticationException( "User credentials 
are invalid" ) );
+            return false;
         }
         catch ( AuthenticationException e )
         {
@@ -157,7 +157,7 @@
 
         if ( isRead )
         {
-            /* if the repositories are public we do not require authentication 
for non-idisk requests */
+            /* if the repositories are public we do not require authentication 
for non-idisk read requests */
             if ( config.getWebdav().isPublicRepositories() )
             {
                 return true;


Reply via email to