in src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreator.java [899:931]
public void createAce(String principalId, String[] grantedPrivilegeNames, String[] deniedPrivilegeNames,
String order, Map<String, Value> restrictions, Map<String, Value[]> mvRestrictions,
Set<String> removedRestrictionNames) throws RepositoryException {
Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap = toLocalPrivileges(grantedPrivilegeNames,
deniedPrivilegeNames);
Set<LocalRestriction> restrictionsSet = new HashSet<>();
if (restrictions != null) {
for (Entry<String, Value> entry: restrictions.entrySet()) {
LocalRestriction lr = new LocalRestriction(entry.getKey(), entry.getValue());
restrictionsSet.add(lr);
}
}
if (mvRestrictions != null) {
for (Entry<String, Value[]> entry: mvRestrictions.entrySet()) {
LocalRestriction lr = new LocalRestriction(entry.getKey(), entry.getValue());
restrictionsSet.add(lr);
}
}
if (!restrictionsSet.isEmpty()) {
for (LocalPrivilege entry: privilegeToLocalPrivilegesMap.values()) {
if (entry.isAllow()) {
entry.setAllowRestrictions(restrictionsSet);
}
if (entry.isDeny()) {
entry.setDenyRestrictions(restrictionsSet);
}
}
}
createAce(principalId, new ArrayList<>(privilegeToLocalPrivilegesMap.values()), order);
}