Skip to content

Commit

Permalink
Add explicit folder name check to close #3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpotts committed Apr 22, 2016
1 parent 46fbf99 commit ab18a58
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ public void onCreateNode(ChildAssociationRef childAssocRef) {
logger.debug("Space template doesn't exist");
return;
}

//confirm that the space template's name is an exact match -- Issue #3
String templateName = (String) nodeService.getProperty(spaceTemplate, ContentModel.PROP_NAME);
if (!templateName.equals(sitePreset)) {
logger.debug("Space template name is not an exact match: " + templateName);
return;
}

//otherwise, create the documentLibrary folder as a child of this site folder
//using the space template found above
Expand Down

0 comments on commit ab18a58

Please sign in to comment.