title: Unable to validate role in Spring Security for url pattern
body: <p>I am using spring security 3.1.7.RELEASE with spring 3.2.13.RELEASE.</p>
  
  <p>I have entry in my spring-security.xml as follows:</p>
  
  <pre><code>&lt;http auto-config="true" use-expressions="true"&gt; 
      &lt;intercept-url pattern=".*admin.htm" access="hasRole(ROLE_ADMIN)" /&gt;
      &lt;intercept-url pattern="/siteadmin/*.htm" access="ROLE_ADMIN" /&gt;
      &lt;intercept-url pattern="/siteadmin/cleancache.htm" access="hasRole('ROLE_ADMIN')" /&gt;
  </code></pre>
  
  <p>When I try to hit url /siteadmin/cleancache.htm I get following exception:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: Failed to evaluate expression
    'ROLE_ADMIN'
      org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:13)
      org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:34)
      org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:18)
      org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:62)</p>
    
    <p>Root Cause:</p>
    
    <p>org.springframework.expression.spel.SpelEvaluationException:
    EL1008E:(pos 0): Property or field 'ROLE_ADMIN' cannot be found on
    object of type
    'org.springframework.security.web.access.expression.WebSecurityExpressionRoot'
    - maybe not public?   org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:214)
      org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85)
      org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:78)
      org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
      org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:98)
      org.springframework.security.access.expression.ExpressionUtils.evaluateAsBoolean(ExpressionUtils.java:11)
      org.springframework.security.web.access.expression.WebExpressionVoter.vote(WebExpressionVoter.java:34)</p>
  </blockquote>
  
  <p>Any pointers on same are highly appreciated.</p>