We have created a custom component to create a Security group. The code is below.
The code completes successfully with no errors but, the security group is not created.
Any help would be appreciated.
log.info(" Creating the group in AEM - " + groupNameToCreate);
userManager.autoSave(true); -- added later to test
Group newGroup = userManager.createGroup(groupNameToCreate);
userIterator = authorizables.iterator();
while (userIterator.hasNext()) {
Authorizable user = userIterator.next();
log.info(" Adding AEM user " + user.getID() + " to group.");
newGroup.addMember(user);
}
adminSession.save(); --added later to test.