assertFalse(implies(p, permissions, "Admin"));
assertFalse(implies(p, permissions, "Peon"));
}
public void testExcludedRemovesRoleConstraint() throws Exception {
URL srcXml = classLoader.getResource("security/web4.xml");
WebAppDocument webAppDoc = WebAppDocument.Factory.parse(srcXml, options);
WebAppType webAppType = webAppDoc.getWebApp();
SpecSecurityBuilder builder = new SpecSecurityBuilder();
ComponentPermissions permissions = builder.buildSpecSecurityConfig(webAppType);
// test excluding longer path than allowed
Permission p = new WebResourcePermission("/Foo/Baz", "GET");
assertTrue(implies(p, permissions, "Admin"));