App app = StructrApp.getInstance(securityContext);
app.create(owner, (NodeInterface)node, PrincipalOwnsNode.class);
Security securityRel = app.create(owner, (NodeInterface)node, Security.class);
securityRel.setAllowed(Permission.values());
node.unlockReadOnlyPropertiesOnce();
node.setProperty(AbstractNode.createdBy, user.getProperty(GraphObject.id));
}