@Test public void testListPrivilegesCaseSensitivity() { CommonPrivilege dbSelect = create(new KeyValue("Server", "Server1"), new KeyValue("db", "db1"), new KeyValue("action", "SELECT")); SimpleFilteredPrivilegeCache cache = new SimpleFilteredPrivilegeCache(Sets.newHashSet(dbSelect.toString()), null); assertEquals(1, cache.listPrivileges(null, null, null, new Server("server1"), new Database("db1")).size()); }
@Override public Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet) { if (cachedPrivileges == null) { cachedPrivileges = new HashSet<String>(); } return cachedPrivileges; }
SimpleFilteredPrivilegeCache implements FilteredPrivilegeCache { @Override public Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet) { if (cachedPrivileges == null) { cachedPrivileges = new HashSet<String>(); } return cachedPrivileges; } }
SimpleFilteredPrivilegeCache implements FilteredPrivilegeCache { @Override public Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet) { if (cachedPrivileges == null) { cachedPrivileges = new HashSet<String>(); } return cachedPrivileges; } SimpleFilteredPrivilegeCache(Set<String> cachedPrivileges, PrivilegeFactory inPrivilegeFactory); }
SimpleFilteredPrivilegeCache implements FilteredPrivilegeCache { @Override public Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet) { if (cachedPrivileges == null) { cachedPrivileges = new HashSet<String>(); } return cachedPrivileges; } SimpleFilteredPrivilegeCache(Set<String> cachedPrivileges, PrivilegeFactory inPrivilegeFactory); @Override Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet); @Override void close(); @Override Set<String> listPrivileges(Set<String> groups, Set<String> users, ActiveRoleSet roleSet); @Override Set<String> listPrivileges(Set<String> groups, Set<String> users, ActiveRoleSet roleSet,
    Authorizable... authorizationHierarchy); @Override Set<Privilege> listPrivilegeObjects(Set<String> groups, Set<String> users, ActiveRoleSet roleSet,
    Authorizable... authorizationHierarchy); }
SimpleFilteredPrivilegeCache implements FilteredPrivilegeCache { @Override public Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet) { if (cachedPrivileges == null) { cachedPrivileges = new HashSet<String>(); } return cachedPrivileges; } SimpleFilteredPrivilegeCache(Set<String> cachedPrivileges, PrivilegeFactory inPrivilegeFactory); @Override Set<String> listPrivileges(Set<String> groups, ActiveRoleSet roleSet); @Override void close(); @Override Set<String> listPrivileges(Set<String> groups, Set<String> users, ActiveRoleSet roleSet); @Override Set<String> listPrivileges(Set<String> groups, Set<String> users, ActiveRoleSet roleSet,
    Authorizable... authorizationHierarchy); @Override Set<Privilege> listPrivilegeObjects(Set<String> groups, Set<String> users, ActiveRoleSet roleSet,
    Authorizable... authorizationHierarchy);  }