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

Shane Bryzak Shane_Bryzak at symantec.com
Thu Jan 25 11:40:47 EST 2007


  User: sbryzak2
  Date: 07/01/25 11:40:47

  Modified:    src/main/org/jboss/seam/security  Identity.java
  Log:
  moved page security config to pages.xml
  
  Revision  Changes    Path
  1.16      +3 -9      jboss-seam/src/main/org/jboss/seam/security/Identity.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Identity.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/Identity.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- Identity.java	25 Jan 2007 13:21:37 -0000	1.15
  +++ Identity.java	25 Jan 2007 16:40:47 -0000	1.16
  @@ -177,7 +177,7 @@
            return false;
         }
        
  -      return Identity.instance().isUserInRole(name);
  +      return isUserInRole(name);
      }
   
      /**
  @@ -283,7 +283,7 @@
      {     
         String name = policyName != null ? policyName : SecurityConfiguration.DEFAULT_LOGIN_MODULE_NAME;
         
  -      return new LoginContext(name, Identity.instance().getSubject(), cbHandler,
  +      return new LoginContext(name, subject, cbHandler,
               SecurityConfiguration.instance().getLoginModuleConfiguration()) {
            @Override public void login() throws LoginException {
               super.login();
  @@ -380,8 +380,6 @@
         }      
      }      
      
  -   private static Pattern EXPR_PATTERN = Pattern.compile("(hasPermission\\s*\\(\\s*'[^']*'\\s*,\\s*'[^']*')(\\s*\\))");
  -
      /**
       * Evaluates the specified security expression, which must return a boolean
       * value.
  @@ -392,11 +390,7 @@
      public boolean evaluateExpression(String expr) 
          throws AuthorizationException
      {     
  -      // TODO Ugly hack!  Fix this once varargs work with EL      
  -      Matcher m = EXPR_PATTERN.matcher(expr);
  -      String replaced = m.replaceAll("$1, null$2");
  -      
  -      return (Boolean) new UnifiedELValueBinding(replaced).getValue(FacesContext.getCurrentInstance());
  +      return (Boolean) new UnifiedELValueBinding(expr).getValue(FacesContext.getCurrentInstance());
      }   
      
      public String getUsername()
  
  
  



More information about the jboss-cvs-commits mailing list