@SuppressWarnings("unchecked")
private List<String> getUserRoles(String user) {
List<String> roles = null;
Database db = ExtLibUtil.getCurrentDatabase();
try {
ACL acl = db.getACL();
if (acl != null) {
ACLEntry entry = acl.getEntry(user);
if (entry != null) {
roles = (List<String>)entry.getRoles();
entry.recycle();
}
acl.recycle();
}
}
catch (Exception e) {
e.printStackTrace();
}