Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The child node is immediately validated against the parent node definition in https://github.com/apache/jackrabbit-filevault/blob/14615ce5647252005f2271b5f5f0351eb91aa78e/vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/impl/nodetype/JcrNodeTypeMetaDataImpl.java#L249. This is too early in case the child node is a folder, as the actual primary type (different from nt:folder) might be set with its file .content.xml only afterwards.
The problematic structure looks like this
+ parent - .content.xml (defining parent's primary type to e.g. rep:AuthorizableFolder) + child - .content.xml (defining child's primary type to e.g. rep:SystemUser)
This leads to errors like
[ERROR] ValidationViolation: "jackrabbit-nodetypes: Node 'child [nt:folder]' is not allowed as child of node with types [rep:AuthorizableFolder]: Node type does not allow arbitrary child nodes and does not allow this specific name and node type either!", filePath=jcr_root/.../parent/child, nodePath=.../parent/child, line=7, column=6
when validating the child folder.
Concrete use case https://github.com/Netcentric/accesscontroltool/tree/develop/accesscontroltool-content-package/src/main/jcr_root/home/users/system/actool/actool-service
Attachments
Issue Links
- causes
-
JCRVLT-539 NodeTypeValidator: more specific jcr:primaryType might be overwritten by generic nt:folder
- Closed