delete pac users
This commit is contained in:
parent
f35545169f
commit
f003a5cc69
@ -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);
|
||||||
|
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user