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.
Solved! Go to Solution.
Views
Replies
Total Likes
Nevermind - it works. I forgot to deploy after writing the save. I put save after each change and I removed autoSave. Apparently you can't autoSave and save together or something.
Nevermind - it works. I forgot to deploy after writing the save. I put save after each change and I removed autoSave. Apparently you can't autoSave and save together or something.