SiteAdminImpl extends WebloungeUserImpl { @Override public boolean implies(Authority authority) { if (authority instanceof Role) { Role authRole = (Role) authority; if (SystemRole.SYSTEMADMIN.equals(authRole)) return false; } return true; } SiteAdminImpl(String login); @Override void setRealm(String realm); @Override boolean implies(Authority authority); @Override boolean equals(Object obj); @Override int hashCode(); static SiteAdminImpl fromXml(Node userNode, Site site); static SiteAdminImpl fromXml(Node userNode, Site site, XPath xpath); String toXml();  }
@Test public void testImpliesSystemAdministratorRole() { assertFalse(user.implies(SystemRole.SYSTEMADMIN)); assertTrue(user.implies(SystemRole.GUEST)); assertTrue(user.implies(new RoleImpl("foo", "bar"))); }