title: SpEL - access session object in spring security
body: <p>Is there a way to access session object within SpEL expression? Specifically I need it in spring security, something like</p>
  
  <pre><code>&lt;intercept-url pattern="/somePage.html" access="session.getAttribute('someTemporaryFlag') != null" /&gt;
  </code></pre>
  
  <p>This code returns: <code>EL1008E:(pos 0): Field or property 'session' cannot be found on object of type 'org.springframework.security.web.access.expression.WebSecurityExpressionRoot'</code>. There's a related question to this one: <a href="https://stackoverflow.com/questions/7885847/list-of-spring-el-variables">List of Spring EL Variables</a> but it doesn't answer my question.</p>
  
  <p>Solution with security roles is not acceptable.</p>