Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #352 from thehyve/rc
Browse files Browse the repository at this point in the history
Release version 1.0.7.
  • Loading branch information
gijskant authored Jun 28, 2021
2 parents 1d9c43a + ad94b0d commit 44a02ba
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.0.7]
- Return all active organisations instead of just the first page of 20. (Resolves issue [PODIUM-307](https://thehyve.atlassian.net/browse/PODIUM-307).)

## [1.0.6]
- Requests to public endpoints no longer send the Authorization header;
- Login issue fixed (an expired/invalid auth token no longer breaks the app);
Expand Down
2 changes: 1 addition & 1 deletion podium-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>nl.thehyve.podium</groupId>
<artifactId>podium</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion podium-gateway/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podium-gateway",
"version": "1.0.6",
"version": "1.0.7",
"description": "Podium Gateway Request Portal",
"private": true,
"cacheDirectories": [
Expand Down
2 changes: 1 addition & 1 deletion podium-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>podium</artifactId>
<groupId>nl.thehyve.podium</groupId>
<version>1.0.6</version>
<version>1.0.7</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion podium-uaa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>podium</artifactId>
<groupId>nl.thehyve.podium</groupId>
<version>1.0.6</version>
<version>1.0.7</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Collection;
import java.util.UUID;
import java.util.*;

/**
* Spring Data JPA repository for the Organisation entity.
Expand All @@ -33,7 +32,7 @@ public interface OrganisationRepository extends JpaRepository<Organisation,Long>

Organisation findByShortNameAndDeletedFalse(String shortName);

Page<Organisation> findAllByActivatedTrueAndDeletedFalse(Pageable pageable);
List<Organisation> findAllByActivatedTrueAndDeletedFalse();

Page<Organisation> findAllByActivatedTrueAndDeletedFalseAndUuidIn(Collection<UUID> organisationUuids, Pageable pageable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ public Page<OrganisationRepresentation> findAll(Pageable pageable) {
/**
* Get active organisations.
*
* @param pageable the pagination information
* @return list of entities
*/
@Transactional(readOnly = true)
public Page<OrganisationRepresentation> findAllAvailable(Pageable pageable) {
public List<OrganisationRepresentation> findAllAvailable() {
log.debug("Request to get all active organisations");
Page<Organisation> result = organisationRepository.findAllByActivatedTrueAndDeletedFalse(pageable);
return result.map(organisationMapper::organisationToOrganisationDTO);
List<Organisation> result = organisationRepository.findAllByActivatedTrueAndDeletedFalse();
return result.stream()
.map(organisationMapper::organisationToOrganisationDTO)
.collect(Collectors.toList());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,18 @@ public ResponseEntity<List<OrganisationRepresentation>> getAdminOrganisations(@A
}

/**
* GET /organisations/available : get all the organisations.
* GET /organisations/available : get all the active organisations.
*
* @param pageable the pagination information
* @return the ResponseEntity with status 200 (OK) and the list of organisations in body
* @throws URISyntaxException if there is an error to generate the pagination HTTP headers
*/
@AnyAuthorisedUser
@GetMapping("/organisations/available")
public ResponseEntity<List<OrganisationRepresentation>> getActiveOrganisations(@ApiParam Pageable pageable)
public ResponseEntity<List<OrganisationRepresentation>> getActiveOrganisations()
throws URISyntaxException {
log.debug("REST request to get a page of Organisations");
Page<OrganisationRepresentation> page = organisationService.findAllAvailable(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/organisations");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
log.debug("REST request to get all active Organisations");
List<OrganisationRepresentation> organisations = organisationService.findAllAvailable();
return new ResponseEntity<>(organisations, HttpStatus.OK);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<groupId>nl.thehyve.podium</groupId>
<artifactId>podium</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<name>Podium</name>
<packaging>pom</packaging>

Expand Down

0 comments on commit 44a02ba

Please sign in to comment.