CugTreePermission extends AbstractTreePermission implements CugConstants { boolean isAllow() { if (status == null) { loadStatus(); } return status.allow; } 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 testIsAllow() { assertTrue(allowedTp.isAllow()); assertFalse(deniedTp.isAllow()); }
@Test public void testIsAllowNestedCug() throws Exception { String childPath = SUPPORTED_PATH + "/subtree"; CugTreePermission tp = getCugTreePermission(childPath); assertFalse(tp.isAllow()); tp = getCugTreePermission(childPath, getTestUser().getPrincipal(), EveryonePrincipal.getInstance()); assertTrue(tp.isAllow()); createCug(childPath, EveryonePrincipal.getInstance()); root.commit(); tp = getCugTreePermission(childPath); assertFalse(tp.isAllow()); tp = getCugTreePermission(childPath, getTestUser().getPrincipal(), EveryonePrincipal.getInstance()); assertTrue(tp.isAllow()); }