[ZEPPELIN-2894] Show user list in notebook permission using Shiro JDBC Realm

This commit is contained in:
janusd 2017-09-01 14:51:48 +02:00
parent 8ee509dcac
commit ab84a5ca85

View file

@ -231,7 +231,7 @@ public class GetUserList {
return userlist;
}
userquery = "select ? from ?";
userquery = String.format("SELECT %s FROM %s", username, tablename);
} catch (IllegalAccessException e) {
LOG.error("Error while accessing dataSource for JDBC Realm", e);
@ -241,8 +241,6 @@ public class GetUserList {
try {
Connection con = dataSource.getConnection();
ps = con.prepareStatement(userquery);
ps.setString(1, username);
ps.setString(2, tablename);
rs = ps.executeQuery();
while (rs.next()) {
userlist.add(rs.getString(1).trim());