public List<OrganizationSummaryBean> getPermittedOrgs(String userId) {
        if (userId == null || userId.isBlank()) {
            return Collections.emptyList();
        }

        return tryAction(() -> {
            Set<String> permittedOrganizations = query.getUserMemberships(userId)
                 .stream()
                 .map(RoleMembershipBean::getOrganizationId)
                 .collect(Collectors.toSet());
            return query.getOrgs(permittedOrganizations);
        });
    }
Some of these arguably live in OrgService

@author Marc Savy {@literal <marc@blackparrotlabs.io>}
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/UserService.java