case Event.PROPERTY_ADDED:
case Event.PROPERTY_CHANGED:
// test if the added/changed prop belongs to an ACe
// node and affects the permission of any of the
// principals listed in principalNames.
PropertyImpl p = (PropertyImpl) session.getProperty(path);
NodeImpl parent = (NodeImpl) p.getParent();
if (parent.isNodeType(NT_REP_ACE)) {
String principalName = null;
if (P_PRIVILEGES.equals(p.getQName())) {
// test if principal-name sibling-prop matches
principalName = parent.getProperty(P_PRINCIPAL_NAME).getString();
} else if (P_PRINCIPAL_NAME.equals(p.getQName())) {
// a new ace or an ace change its principal-name.
principalName = p.getString();
}
if (principalName != null &&
principalNames.contains(principalName)) {
clearCache = true;
}