for (String principalName: authUsers.keySet()) {
String principalId = getPrincipalIdForName(principalName);
Map<String,String> roleDetails = new HashMap<String,String>();
roleDetails.put(KimConstants.AttributeConstants.NAMESPACE_CODE, MartinlawConstants.MODULE_NAMESPACE_CODE);
roleDetails.put(KimConstants.AttributeConstants.GROUP_NAME, "org.martinlaw.client");
boolean auth = new IdentityManagementKimDocumentAuthorizer().isAuthorizedByTemplate(
document,
KimConstants.NAMESPACE_CODE,
KimConstants.PermissionTemplateNames.POPULATE_GROUP,
principalId,
roleDetails, null);