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