in src/main/java/org/apache/sling/jcr/jackrabbit/accessmanager/impl/PrivilegesHelper.java [221:235]
private static void expandAllowPrivWithoutAggregates(Map<Privilege, LocalPrivilege> privilegeToLocalPrivilegesMap,
Privilege p, boolean isAllow, Set<LocalRestriction> restrictions) throws RepositoryException {
if (p.isAggregate()) {
Privilege[] aggregatePrivileges = p.getDeclaredAggregatePrivileges();
for (Privilege aggregatePrivilege : aggregatePrivileges) {
if (aggregatePrivilege.isAggregate()) {
expandAllowPrivWithoutAggregates(privilegeToLocalPrivilegesMap, aggregatePrivilege, isAllow, restrictions);
} else {
localAllowPriv(privilegeToLocalPrivilegesMap, aggregatePrivilege, isAllow, restrictions);
}
}
} else {
localAllowPriv(privilegeToLocalPrivilegesMap, p, isAllow, restrictions);
}
}