When setting an ACL on a child document, it generates an ACL tag outside the document element and bound to another factoryBinding:
<extension target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService" point="factoryBinding"> <factoryBinding name="DomainFactory" factoryName="SimpleTemplateFactory" targetType="Domain"> <template> <templateItem typeName="WorkspaceRoot" id="workspaces" title="Workspaces" description="Workspace Root"/> <templateItem typeName="SectionRoot" id="sections" title="Sections" description="Sections Root"/> <templateItem typeName="TemplateRoot" id="templates" title="Templates" description="Workspace Templates Root"/> <templateItem typeName="WorkspaceRoot" id="universe" title="Universe" description=""/> </template> </factoryBinding> <factoryBinding name="WorkspaceRootFactory" factoryName="SimpleTemplateFactory" targetType="WorkspaceRoot"> <acl> <ace principal="foo" permission="Everthing" granted="true"/> <ace principal="Everyone" permission="Everything" granted="false"/> </acl> </factoryBinding> <factoryBinding name="SectionRootFactory" factoryName="SimpleTemplateFactory" targetType="SectionRoot"> <acl> <ace principal="Everyone" permission="Everything" granted="true"/> </acl> </factoryBinding> <factoryBinding name="WorkspaceRootFactory" factoryName="SimpleTemplateFactory" targetType="WorkspaceRoot"> <acl> <ace principal="jack" permission="Write" granted="true"/> </acl> </factoryBinding>
=> problems with two factories bound to WorkspaceRoot
The correct generation should look like below, with ACL tag inside templateItem tag
<extension target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService" point="factoryBinding"> <factoryBinding name="DomainFactory" factoryName="SimpleTemplateFactory" targetType="Domain"> <template> <templateItem typeName="WorkspaceRoot" id="workspaces" title="Workspaces" description="Workspace Root"> <acl> <ace principal="foo" permission="Everthing" granted="true"/> <ace principal="Everyone" permission="Everything" granted="false"/> </acl> </templateItem> <templateItem typeName="SectionRoot" id="sections" title="Sections" description="Sections Root"> <acl> <ace principal="Everyone" permission="Everything" granted="true"/> </acl> </templateItem> <templateItem typeName="TemplateRoot" id="templates" title="Templates" description="Workspace Templates Root"/> <templateItem typeName="WorkspaceRoot" id="universe" title="Universe" description=""> <acl> <ace principal="jack" permission="Write" granted="true"/> </acl> </templateItem> </template> </factoryBinding>