use of com.epam.pipeline.entity.AbstractSecuredEntity in project cloud-pipeline by epam.
the class GrantPermissionManager method convertAclToEntryForUser.
private AclSecuredEntry convertAclToEntryForUser(AbstractSecuredEntity entity, MutableAcl acl, Sid sid) {
AclSid aclSid = new AclSid(sid);
AclSecuredEntry entry = convertAclToEntry(entity, acl);
List<AclPermissionEntry> filteredPermissions = entry.getPermissions().stream().filter(p -> p.getSid().equals(aclSid)).collect(toList());
entry.setPermissions(filteredPermissions);
return entry;
}
Aggregations