title: How can I set an Admin/Superuser role to have complete access using Spring Security?
body: <p>I want to limit access to directories based on roles, e.g.,:</p>
  
  <pre><code>&lt;intercept-url pattern="/foo/**" access="hasRole('ROLE_FOO')"/&gt;
  &lt;intercept-url pattern="/bar/**" access="hasRole('ROLE_BAR')"/&gt;
  </code></pre>
  
  <p>But I also want a superuser role that can access everything, e.g., :</p>
  
  <pre><code>&lt;intercept-url pattern="/**" access="hasRole('ROLE_SUPERUSER')"/&gt;
  </code></pre>
  
  <p>Is there a way to accomplish this other than using hasAnyRole, throughout? e.g.,  </p>
  
  <pre><code>&lt;!-- This seems ugly, with all the repeated references. OTOH, it's explicit --&gt;
  &lt;intercept-url pattern="/foo/**" access="hasAnyRole('ROLE_FOO', 'ROLE_SUPERUSER')"/&gt;
  &lt;intercept-url pattern="/bar/**" access="hasRole('ROLE_BAR') or hasRole('ROLE_SUPERUSER')"/&gt;
  </code></pre>