use of uk.gov.gchq.gaffer.commonutil.elementvisibilityutil.Authorisations in project Gaffer by gchq.
the class GetElementsUtil method applyVisibilityFilter.
public static Stream<Element> applyVisibilityFilter(final Stream<Element> elements, final Schema schema, final User user) {
final Set<String> dataAuths = user.getDataAuths();
final Authorisations authorisations = new Authorisations(dataAuths.toArray(new String[dataAuths.size()]));
return elements.filter(e -> isVisible(e, schema.getVisibilityProperty(), authorisations));
}
Aggregations