NoPermissions implements CompiledPermissions { @Override public boolean isGranted(@NotNull Tree tree, @Nullable PropertyState property, long permissions) { return false; } private  NoPermissions(); @Override void refresh(@NotNull Root root, @NotNull String workspaceName); @NotNull @Override RepositoryPermission getRepositoryPermission(); @NotNull @Override TreePermission getTreePermission(@NotNull Tree tree, @NotNull TreePermission parentPermission); @NotNull @Override TreePermission getTreePermission(@NotNull Tree tree, @NotNull TreeType type, @NotNull TreePermission parentPermission); @Override boolean isGranted(@NotNull Tree tree, @Nullable PropertyState property, long permissions); @Override boolean isGranted(@NotNull String path, long permissions); @NotNull @Override Set<String> getPrivileges(@Nullable Tree tree); @Override boolean hasPrivileges(@Nullable Tree tree, @NotNull String... privilegeNames);  }
@Test public void testIsGranted() { for (String path : paths) { Tree tree = getRootProvider().createReadOnlyRoot(root).getTree(path); assertFalse(noPermissions.isGranted(tree, null, Permissions.NO_PERMISSION)); for (PropertyState prop : tree.getProperties()) { assertFalse(noPermissions.isGranted(tree, prop, Permissions.NO_PERMISSION)); } for (Tree child : tree.getChildren()) { assertFalse(noPermissions.isGranted(child, null, Permissions.NO_PERMISSION)); } } }