ctubbsii commented on issue #56:
URL: https://github.com/apache/accumulo-access/issues/56#issuecomment-1944292402
> The following proposed API
>
> ```java
> var evaluator = Authorizations.of("a", "b").evaluator();
> ```
>
> does not support the functionality of this [existing
API](https://github.com/apache/accumulo-access/blob/009246e93aaa91dc4ce0b2a35ae8f14ddf04e210/src/main/java/org/apache/accumulo/access/AccessEvaluator.java#L100-L153)
Yeah, I thought about that, but I was wondering if it would make more sense
to do something like:
```java
Stream.of(authorizations1, authorizations2).allMatch(authorizations ->
authorizations.canAccess(expression));
// or
Stream.of(authorizations1, authorizations2).anyMatch(authorizations ->
authorizations.canAccess(expression));
```
I don't know how much optimization is actually being done, or how much
utility there is in making the evaluator operate on sets of authorizations,
rather than on something that I think is a bit more clear like the above on the
caller's end. My instinct is that it's not much of an optimization and the
above would be more clear, so we don't actually need the multiple-sets API, as
it's superfluous, but I don't know for sure without digging more.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]