CugTreePermission extends AbstractTreePermission implements CugConstants { boolean hasNestedCug() { if (status == null) { loadStatus(); } return status.hasNested; } CugTreePermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent,
                      @NotNull CugPermissionProvider permissionProvider);   CugTreePermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parent,
                      @NotNull CugPermissionProvider permissionProvider, boolean inCug, boolean canRead, boolean hasNestedCug); @Override boolean canRead(); @Override boolean canRead(@NotNull PropertyState property); @Override boolean canReadAll(); @Override boolean canReadProperties(); @Override boolean isGranted(long permissions); @Override boolean isGranted(long permissions, @NotNull PropertyState property);  }
@Test public void testHasNested() { CugTreePermission tp = getCugTreePermission(SUPPORTED_PATH); assertFalse(tp.hasNestedCug()); String childPath = SUPPORTED_PATH + "/subtree"; tp = getCugTreePermission(childPath); assertFalse(tp.hasNestedCug()); }
@Test public void testHasNestedWithNestedCug() throws Exception { String childPath = SUPPORTED_PATH + "/subtree"; createCug(childPath, EveryonePrincipal.getInstance()); root.commit(); CugTreePermission tp = getCugTreePermission(SUPPORTED_PATH); assertTrue(tp.hasNestedCug()); tp = getCugTreePermission(childPath); assertFalse(tp.hasNestedCug()); }