Uploaded image for project: 'eXo-JCR'
  1. eXo-JCR
  2. EXOJCR-1869

Validation primary type allowing don't take care about node name

    Details

      Description

      In validation of adding child node we check if primary type is allowed:

       if (!nodeTypeDataManager.isChildNodePrimaryTypeAllowed(primaryTypeName, nodeData().getPrimaryTypeName(),
               nodeData().getMixinTypeNames()))
            {
               throw new ConstraintViolationException("Can't add node " + sysLocFactory.createJCRName(name).getAsString()
                  + " to " + getPath() + " node type " + sysLocFactory.createJCRName(primaryTypeName).getAsString()
                  + " is not allowed as child's node type for parent node type ");
      
            }
      

      But actually needed also to take in account node name.
      For example, there is node A which allow nodes: with name B1 and node type T1, with name B2 and node type T2. When we are trying to add node B1 with node type T2 the validation will be passed, but should not.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                andrew.plotnikov Andrew Plotnikov
                Reporter:
                tolusha Anatolii Bazko
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d