delete pac users

This commit is contained in:
Peter Hormanns 2011-07-28 17:00:36 +00:00
parent f35545169f
commit f003a5cc69
2 changed files with 5 additions and 4 deletions

View File

@ -148,7 +148,6 @@ public class PacModuleImpl extends AbstractModuleImpl {
for (UnixUser user : pac.getUnixUser()) { for (UnixUser user : pac.getUnixUser()) {
if (!pacName.equals(user.getName())) { if (!pacName.equals(user.getName())) {
helperModule.delete(user); helperModule.delete(user);
// pac.getUnixUser().remove(user);
} }
} }
super.delete(existingEntity); super.delete(existingEntity);

View File

@ -68,16 +68,18 @@ public class PacProcessorFactory implements EntityProcessorFactory {
public <T extends AbstractEntity> Processor createDeleteProcessor( public <T extends AbstractEntity> Processor createDeleteProcessor(
EntityManager em, T entity) throws ProcessorException { EntityManager em, T entity) throws ProcessorException {
Pac pac = (Pac) entity; Pac pac = (Pac) entity;
em.refresh(pac);
Hive hive = pac.getHive(); Hive hive = pac.getHive();
UnixUser unixUser = getPacAdminUser(pac); UnixUser unixUser = getPacAdminUser(pac);
Map<String, String> hiveValues = fillHiveValues(hive); Map<String, String> hiveValues = fillHiveValues(hive);
List<Map<String, String>> pacValuesList = fillPacValuesList(hive); List<Map<String, String>> pacValuesList = fillPacValuesList(hive);
return new CompoundProcessor( WaitingTasksProcessor waitingProcessor = new WaitingTasksProcessor(new CompoundProcessor(
createEtcHostsProc(hiveValues, pacValuesList), createEtcHostsProc(hiveValues, pacValuesList),
createNetworkInterfacesProc(hiveValues, pacValuesList), createNetworkInterfacesProc(hiveValues, pacValuesList),
createSudouersProc(hiveValues, pacValuesList), createSudouersProc(hiveValues, pacValuesList),
createProftpdConfProc(hiveValues, pacValuesList), createProftpdConfProc(hiveValues, pacValuesList)));
createDelUserProc(unixUser.getName())); waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(unixUser.getName()), "remove packet");
return waitingProcessor;
} }
private TemplateProcessor createEtcHostsProc( private TemplateProcessor createEtcHostsProc(