private void checkOwnershipForCopy(final ExplorerNode node,
                                       final PermissionInheritance permissionInheritance) {
        if (ALLOW_PERMISSION_CHANGE.contains(permissionInheritance)) {
            if (!securityContext.hasDocumentPermission(node.getDocRef(), DocumentPermission.OWNER)) {
                throw new PermissionException(securityContext.getUserRef(),
                        "You must have 'Owner' permission on the document to copy it with permission mode '"
                        + permissionInheritance.getDisplayValue() + "'.");
            }
        }
    }
Create a map of folders and their child items.
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/ExplorerServiceImpl.java