code: public static Access authorizeAllResourceActions(
        final AuthenticationResult authenticationResult,
        final Iterable<ResourceAction> resourceActions,
        final AuthorizerMapper authorizerMapper
    )
    {
      final Authorizer authorizer = authorizerMapper.getAuthorizer(authenticationResult.getAuthorizerName());
      if (authorizer == null) {
        throw new ISE("No authorizer found with name: [%s].", authenticationResult.getAuthorizerName());
      }
  
      // this method returns on first failure, so only successful Access results are kept in the cache
      final Set<ResourceAction> resultCache = new HashSet<>();
  
      for (ResourceAction resourceAction : resourceActions) {
        if (resultCache.contains(resourceAction)) {
          continue;
        }
        final Access access = authorizer.authorize(
            authenticationResult,
            resourceAction.getResource(),
            resourceAction.getAction()
        );
        if (!access.isAllowed()) {
          return access;
        } else {
          resultCache.add(resourceAction);
        }
      }
  
      return Access.OK;
    }
docs: Check a list of resource-actions to be performed by the identity represented by authenticationResult.
  
  If one of the resource-actions fails the authorization check, this method returns the failed
  Access object from the check.
  
  Otherwise, return ACCESS_OK if all resource-actions were successfully authorized.
  
  @param authenticationResult Authentication result representing identity of requester
  @param resourceActions      An Iterable of resource-actions to authorize
  
  @return ACCESS_OK or the Access object from the first failed check