}
}
group.getAuthorities().removeAll(removed);
for (Resource resource : resources) {
Authority authority = Model.newInstance(Authority.class);
authority.setGroup(group);
authority.setResource(resource);
group.getAuthorities().add(authority);
}
entityDao.remove(removed);
entityDao.saveOrUpdate(group);
publish(new GroupAuthorityEvent(group));