From f003a5cc697ea01b38883c4a0c5487af48a80fe1 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Thu, 28 Jul 2011 17:00:36 +0000 Subject: [PATCH] delete pac users --- hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java | 1 - hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java index 911366d..8b1ec24 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacModuleImpl.java @@ -148,7 +148,6 @@ public class PacModuleImpl extends AbstractModuleImpl { for (UnixUser user : pac.getUnixUser()) { if (!pacName.equals(user.getName())) { helperModule.delete(user); -// pac.getUnixUser().remove(user); } } super.delete(existingEntity); diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java index 1423b48..f96a02a 100644 --- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java @@ -68,16 +68,18 @@ public class PacProcessorFactory implements EntityProcessorFactory { public Processor createDeleteProcessor( EntityManager em, T entity) throws ProcessorException { Pac pac = (Pac) entity; + em.refresh(pac); Hive hive = pac.getHive(); UnixUser unixUser = getPacAdminUser(pac); Map hiveValues = fillHiveValues(hive); List> pacValuesList = fillPacValuesList(hive); - return new CompoundProcessor( + WaitingTasksProcessor waitingProcessor = new WaitingTasksProcessor(new CompoundProcessor( createEtcHostsProc(hiveValues, pacValuesList), createNetworkInterfacesProc(hiveValues, pacValuesList), createSudouersProc(hiveValues, pacValuesList), - createProftpdConfProc(hiveValues, pacValuesList), - createDelUserProc(unixUser.getName())); + createProftpdConfProc(hiveValues, pacValuesList))); + waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(unixUser.getName()), "remove packet"); + return waitingProcessor; } private TemplateProcessor createEtcHostsProc(