class UtilAuthorizationService {

    public CheckResourceRightsV4Response getResourceRightsResult(CheckResourceRightsV4Request checkResourceRightsV4Request) {
        String userCrn = ThreadBasedUserCrnProvider.getUserCrn();
        List<AuthorizationProto.RightCheck> rightChecks = Lists.newArrayList();
        checkResourceRightsV4Request.getResourceRights().stream()
                .forEach(resourceRightsV4 -> resourceRightsV4.getRights().stream()
                    .forEach(rightV4 ->  rightChecks.add(createRightCheckObject(rightV4.getAction().getRight(), resourceRightsV4.getResourceCrn()))));
        List<Boolean> results = grpcUmsClient.hasRights(userCrn, userCrn, rightChecks, MDCUtils.getRequestId());
        return generateResponse(rightChecks, results);
    }

}