Include inherited permissions
In Permissions API v1, add a static private class _AclObjectIdentity
extending AclObjectIdentity with
public List<AclEntry> inherited;
In method lazyLoadForJson
, return _AclObjectIdentity
and fill the inherited
list recursively with ACL entries for all parentObjects
:
private void inhertied(AclObjectIdentity objectIdentity, List<AclEntry> aclEntries, Set<AclObjectIdentity> handled) {
if (objectIdentity == null || handled.contains(objectIdentity)) {
return aclEntries;
}
aclEntries.addAll(objectIdentity.getAclEntries());
handled.add(objectIdentity);
if (objectIdentity.getParentObject() != null) {
inherited(objectIdentity.getParentObject(), aclEntries, handled);
}
}
Also add objectIdentity.inherited.forEach(entry -> entry.getAclSid().getId());
.