You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ra...@apache.org on 2010/11/28 16:45:04 UTC

svn commit: r1039895 - /lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java

Author: rainer
Date: Sun Nov 28 15:45:04 2010
New Revision: 1039895

URL: http://svn.apache.org/viewvc?rev=1039895&view=rev
Log:
Add patch for Bug 42854 (missing from last checkin).

Modified:
    lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java

Modified: lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java?rev=1039895&r1=1039894&r2=1039895&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java (original)
+++ lenya/branches/BRANCH_2_1_X/src/modules-core/ac/java/src/org/apache/lenya/cms/cocoon/acting/DelegatingAuthenticatorAction.java Sun Nov 28 15:45:04 2010
@@ -29,6 +29,8 @@ import org.apache.cocoon.environment.Red
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.SourceResolver;
 
+import org.apache.lenya.ac.AccessControlException;
+
 /**
  * Authenticator action that delegates the authentication to an access controller.
  */
@@ -49,13 +51,19 @@ public class DelegatingAuthenticatorActi
 
         Request request = ObjectModelHelper.getRequest(objectModel);
         Map result = null;
-        if (getAccessController().authenticate(request)) {
-            getLogger().debug("Authentication successful.");
-            result = Collections.EMPTY_MAP;
-        }
-        else {
-            getLogger().debug("Authentication failed.");
-        }
+
+	try {
+	    if (getAccessController().authenticate(request)) {
+		getLogger().debug("Authentication successful.");
+		result = Collections.EMPTY_MAP;
+	    }
+	    else {
+		getLogger().debug("Authentication failed.");
+	    }
+	}
+	catch (AccessControlException e) {
+	    getLogger().debug("Authentication failed due to AccessControlException: " + e.getMessage());
+	}
         return result;
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org