myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1070422 - /myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java
Date Mon, 14 Feb 2011 10:07:35 GMT
Author: gpetracek
Date: Mon Feb 14 10:07:34 2011
New Revision: 1070422

URL: http://svn.apache.org/viewvc?rev=1070422&view=rev
Log:
EXTCDI-135 check configured access-decision-voters for std. navigation

Modified:
    myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java

Modified: myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java?rev=1070422&r1=1070421&r2=1070422&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java
(original)
+++ myfaces/extensions/cdi/trunk/jee-modules/jsf-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/jsf/impl/navigation/ViewConfigAwareNavigationHandler.java
Mon Feb 14 10:07:34 2011
@@ -142,6 +142,27 @@ public class ViewConfigAwareNavigationHa
             }
         }
 
+        handleStandardNavigation(facesContext, fromAction, outcome);
+    }
+
+    private void handleStandardNavigation(FacesContext facesContext, String fromAction, String
outcome)
+    {
+        //security
+        try
+        {
+            ViewConfigEntry entry = ViewConfigCache.getViewDefinition(facesContext.getViewRoot().getViewId());
+
+            if(entry != null)
+            {
+                invokeVoters(null, this.beanManager, entry.getAccessDecisionVoters(), entry.getErrorView());
+            }
+        }
+        catch (AccessDeniedException accessDeniedException)
+        {
+            tryToHandleSecurityViolation(accessDeniedException);
+            return;
+        }
+
         this.navigationHandler.handleNavigation(facesContext, fromAction, outcome);
     }
 



Mime
View raw message