@Override
    public List<ApiVersionSummaryBean> listApiVersions(String orgId, String apiId) {
        LOG.debug("Listing all API versions");
        securityContext.checkPermissionsOrDiscoverability(
                EntityType.API,
                orgId,
                apiId,
                Set.of(PermissionType.apiView)
        );

        return apiService.listApiVersions(orgId, apiId).stream()
                .filter(av -> securityContext.hasPermissionsOrDiscoverable(EntityType.API, orgId, apiId, av.getVersion(), Set.of(PermissionType.apiView)))
                .collect(Collectors.toList());
    }
@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/DeveloperPortalResourceImpl.java