// Checking parent related restrictions
restrictions = node.getRestrictionsByPath(IUserLayoutRestriction.PARENT_RESTRICTION_PATH);
for ( Iterator i = restrictions.iterator(); i.hasNext(); ) {
IUserLayoutRestriction restriction = (IUserLayoutRestriction) i.next();
if ( !restriction.getName().equals(RestrictionTypes.DEPTH_RESTRICTION) &&
!restriction.checkRestriction(newParentNode) )
return false;
}
// Checking depth restrictions for the node and all its descendants
if ( !checkDepthRestrictions(nodeId,newParentId) )