public RepositoryPermission getRepositoryPermission() {
throw new UnsupportedOperationException("Not supported");
}
public TreePermission getTreePermission(Tree tree, TreePermission parentPermission) {
ImmutableTree immutableTree = getImmutableTree(tree);
if (ctx.definesContextRoot(immutableTree)) {
return TreePermission.EMPTY;
}
if (parentPermission instanceof CugTreePermission) {
if (hasCug(immutableTree)) {
return createCugPermission(immutableTree);
} else {
return new CugTreePermission(immutableTree, ((CugTreePermission) parentPermission).allow);
}
} else if (parentPermission == TreePermission.EMPTY && !immutableTree.isRoot()) {
return TreePermission.EMPTY;
} else {
String path = immutableTree.getPath();
if (includes(path)) {
return createCugPermission(immutableTree);
} else if (mayContainCug(path)) {
return new EmptyCugPermission(immutableTree);
} else {