[jboss-cvs] jboss-seam/src/main/org/jboss/seam/pages ...

Shane Bryzak Shane_Bryzak at symantec.com
Fri Jan 26 00:28:51 EST 2007


  User: sbryzak2
  Date: 07/01/26 00:28:51

  Modified:    src/main/org/jboss/seam/pages  Page.java
  Log:
  security filter replaced by security check in Page
  
  Revision  Changes    Path
  1.6       +13 -0     jboss-seam/src/main/org/jboss/seam/pages/Page.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Page.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/pages/Page.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- Page.java	25 Jan 2007 16:40:47 -0000	1.5
  +++ Page.java	26 Jan 2007 05:28:51 -0000	1.6
  @@ -8,6 +8,8 @@
   import org.jboss.seam.core.Interpolator;
   import org.jboss.seam.core.Locale;
   import org.jboss.seam.core.Pages;
  +import org.jboss.seam.security.AuthorizationException;
  +import org.jboss.seam.security.Identity;
   /**
    * Metadata about page actions, page parameters, action navigation,
    * resource bundle, etc, for a particular JSF view id.
  @@ -174,6 +176,17 @@
       */
      public boolean enter(FacesContext facesContext)
      {
  +      if (isRestricted())
  +      {
  +         String expr = restriction;
  +         // If no expression is configured, create a default one
  +         if (expr == null)
  +            expr = String.format("#{s:hasPermission('%s', 'view', null)}", 
  +                     getViewId());
  +            
  +            Identity.instance().checkRestriction(expr);
  +      }      
  +      
         boolean result = false;
         
         getConversationControl().beginOrEndConversation();
  
  
  



More information about the jboss-cvs-commits mailing list