title: Grails + Selenium + EasyB +spring-security-core: ifAnyGranted Isn't Working
body: <p>Grails 1.3.5 and have selenium-rc, easyb, and spring-security-core plugins installed.  Everything seems to work really well except this one case I've run into.  I have a page I am testing which has the following markup:</p>
  
  <pre><code>&lt;sec:ifAnyGranted roles='ROLE_ADMIN'&gt;
      &lt;span class="menuButton"&gt;
        &lt;g:link mapping="adminPage"&gt;
          &lt;g:message code="default.admin.label" default="--Admin--"/&gt;
        &lt;/g:link&gt;
      &lt;/span&gt;
  &lt;/sec:ifAnyGranted&gt;
  </code></pre>
  
  <p>When running the application normally, everything works fine.  If I'm logged in as a regular user, the Admin link doesn't show.  If I log in as an admin, the link does show up.  When running my test, no matter who is logged in, the check fails, so the Admin link is never rendered.</p>
  
  <pre><code>scenario "An Admin User logs into the system", {
     when "the user completes the login form with proper credentials", {
  
     grailsApplication = ApplicationHolder.application
     springSecurityService = ApplicationHolder.application.mainContext.getBean("springSecurityService")
  
     def userAdmin = new User(username: 'testAdmin', firstName: 'Test', lastName: 'Admin', enabled: true, password: springSecurityService.encodePassword("password")).save(flush: true)
     def roleAdmin = new Role(authority: 'ROLE_ADMIN').save(flush: true)
     UserRole.create(userAdmin, roleAdmin)
  
     selenium.openAndWait("/platform/login/auth")
     selenium.type('j_username', 'testAdmin')
     selenium.type('j_password', 'password')
     selenium.clickAndWait('signInBtn')
  
   }
   then "the user should be logged in and viewing their My Account page, as an admin", {
     selenium.isTextPresent("Welcome Test").shouldBe true
     selenium.isElementPresent('link=Admin').shouldBe true
  
   }
  }
  </code></pre>
  
  <p>Other tags work just fine such as ifLoggedIn and ifNotLoggedIn.  Anyone know if this is a known issue or any other info on it?  Thanks.</p>