@Nonnull
@Override
public Validator getRootValidator(NodeState before, NodeState after) {
Subject subject = Subject.getSubject(AccessController.getContext());
Set<Principal> principals = (subject != null) ? subject.getPrincipals() : Collections.<Principal>emptySet();
CompiledPermissions permissions = acConfiguration.getPermissionProvider(NamePathMapper.DEFAULT).getCompiledPermissions(/*TODO*/null, principals);
NodeUtil rootBefore = new NodeUtil(new ReadOnlyTree(before));
NodeUtil rootAfter = new NodeUtil(new ReadOnlyTree(after));
return new PermissionValidator(rootBefore, rootAfter, permissions, this);
}