EntityAccess ea = getEntityAccess(request);
if(panel.getAttribute("system_entityAccess") == null) {
panel.setAttribute("system_entityAccess", ea);
List<UsergroupVO> usergroups = new UsergroupDAO().getList(null, UsergroupDAO.AdminSelect.ALL, new Sort(UsergroupDAO.SORT_NAME, true), null, activeUser);
// load a set usergroup where you do not have rights
boolean usergroupAccess = false;
for(UsergroupVO vo : usergroups) {
if(ea.getOwnerGroup().equals(vo.getId())) {
usergroupAccess = true;
break;
}
}
if(!usergroupAccess) {
UsergroupVO vo = new UsergroupDAO().getById(ea.getOwnerGroup());
usergroups.add(0, vo);
}
Collections.sort(usergroups, new Comparator<UsergroupVO>() {
public int compare(UsergroupVO usergroup1, UsergroupVO usergroup2)
{