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

Shane Bryzak Shane_Bryzak at symantec.com
Tue Oct 17 22:03:19 EDT 2006


  User: sbryzak2
  Date: 06/10/17 22:03:19

  Modified:    src/main/org/jboss/seam/interceptors 
                        SecurityInterceptor.java
  Log:
  More security stuff
  
  Revision  Changes    Path
  1.5       +7 -0      jboss-seam/src/main/org/jboss/seam/interceptors/SecurityInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SecurityInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/SecurityInterceptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- SecurityInterceptor.java	17 Oct 2006 23:50:47 -0000	1.4
  +++ SecurityInterceptor.java	18 Oct 2006 02:03:19 -0000	1.5
  @@ -4,10 +4,13 @@
   import javax.interceptor.AroundInvoke;
   import javax.interceptor.InvocationContext;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.jboss.seam.Component;
   import org.jboss.seam.annotations.Interceptor;
   import org.jboss.seam.annotations.Permission;
   import org.jboss.seam.annotations.Secure;
  +import org.jboss.seam.core.FacesMessages;
   import org.jboss.seam.security.Authentication;
   import org.jboss.seam.security.AuthenticationException;
   import org.jboss.seam.security.SeamSecurityManager;
  @@ -22,6 +25,8 @@
                within = BijectionInterceptor.class)
   public class SecurityInterceptor extends AbstractInterceptor
   {
  +  private static final Log log = LogFactory.getLog(SecurityInterceptor.class);
  +
     public static boolean isComponentSecure(Component component)
     {
       if (component.getBeanClass().isAnnotationPresent(Secure.class))
  @@ -97,6 +102,8 @@
         }
         catch (SecurityException ex)
         {
  +        log.info(ex.getMessage());
  +        FacesMessages.instance().add(ex.getMessage());
           // Fall through to error page
         }
   
  
  
  



More information about the jboss-cvs-commits mailing list