Commit 5bd51778 authored by LAVENIER's avatar LAVENIER
Browse files

Merge branch 'release/1.10.1'

parents 6b14b528 88c19bb3
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>SUMARiS</name> <name>SUMARiS</name>
<description>SUMARiS :: Maven parent</description> <description>SUMARiS :: Maven parent</description>
......
...@@ -11,20 +11,24 @@ cd ${PROJECT_DIR} ...@@ -11,20 +11,24 @@ cd ${PROJECT_DIR}
### Variables ### Variables
task=$1 task=$1
release_description=$2 version=$2
release_description=$3
PROJECT_NAME=sumaris-pod PROJECT_NAME=sumaris-pod
REPO="sumaris-net/sumaris-pod" REPO="sumaris-net/sumaris-pod"
REPO_API_URL=https://api.github.com/repos/$REPO REPO_API_URL=https://api.github.com/repos/$REPO
REPO_PUBLIC_URL=https://github.com/$REPO REPO_PUBLIC_URL=https://github.com/$REPO
### Get version to release ### Get version to release
version=`grep -m1 -P "\<version>[0-9A−Z.]+(-\w*)?</version>" pom.xml | grep -oP "\d+.\d+.\d+(-\w*)?"`
if [[ "_$version" == "_" ]]; then if [[ "_$version" == "_" ]]; then
echo "ERROR: Unable to read 'version' in the file 'pom.xml'." version=`grep -m1 -P "\<version>[0-9A−Z.]+(-\w*)?</version>" pom.xml | grep -oP "\d+.\d+.\d+(-\w*)?"`
echo " - Make sure the file 'pom.xml' exists and is readable." if [[ "_$version" == "_" ]]; then
exit 1 echo "ERROR: Unable to read 'version' in the file 'pom.xml'."
echo " - Make sure the file 'pom.xml' exists and is readable."
exit 1
fi
echo "Project version (pom.xml): $version"
release_description=$2
fi fi
echo "Project version (pom.xml): $version"
### get auth token ### get auth token
if [[ "_${GITHUB_TOKEN}" == "_" ]]; then if [[ "_${GITHUB_TOKEN}" == "_" ]]; then
...@@ -53,15 +57,6 @@ case "$task" in ...@@ -53,15 +57,6 @@ case "$task" in
pre|rel) pre|rel)
### Control that the script is run on `dev` branch
branch=`git rev-parse --abbrev-ref HEAD`
echo "GIT branch: $branch"
if [[ ! "$branch" = "release/$version" ]];
then
echo ">> This script must be run under a release branch (release/$version)"
exit 1
fi
if [[ $1 = "pre" ]]; then if [[ $1 = "pre" ]]; then
prerelease="true" prerelease="true"
else else
...@@ -124,7 +119,7 @@ case "$task" in ...@@ -124,7 +119,7 @@ case "$task" in
missing_file=true missing_file=true
else else
artifact_name="sumaris-pod-$version.zip" artifact_name="sumaris-pod-$version.zip"
result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${ZIP_FILE}" "${upload_url}?name=${ZIP_FILENAME}") result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${ZIP_FILE}" "${upload_url}?name=${artifact_name}")
browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"` browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"`
SHA256=$(sha256sum "${ZIP_FILE}" | sed 's/ /\n/gi' | head -n 1) SHA256=$(sha256sum "${ZIP_FILE}" | sed 's/ /\n/gi' | head -n 1)
echo " - $browser_download_url | SHA256: ${SHA256}" echo " - $browser_download_url | SHA256: ${SHA256}"
......
...@@ -84,7 +84,7 @@ echo "" ...@@ -84,7 +84,7 @@ echo ""
echo "---- Uploading artifacts to Github..." echo "---- Uploading artifacts to Github..."
# Pause (wait propagation to from gitlab to github) # Pause (wait propagation to from gitlab to github)
echo " Waiting 40s, for propagation to github..." && sleep 40s echo " Waiting 40s, for propagation to github..." && sleep 40s
. ${PROJECT_DIR}/src/scripts/release-to-github.sh $task ''"$release_description"'' . ${PROJECT_DIR}/src/scripts/release-to-github.sh $task $version ''"$release_description"''
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
echo "---- Uploading artifacts to Github [OK]" echo "---- Uploading artifacts to Github [OK]"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<artifactId>sumaris-core-extraction</artifactId> <artifactId>sumaris-core-extraction</artifactId>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<artifactId>sumaris-core-shared</artifactId> <artifactId>sumaris-core-shared</artifactId>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<artifactId>sumaris-core</artifactId> <artifactId>sumaris-core</artifactId>
......
...@@ -316,75 +316,84 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao { ...@@ -316,75 +316,84 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao {
/* -- protected methods -- */ /* -- protected methods -- */
private <R> TypedQuery<R> createVesselQuery(CriteriaBuilder builder, CriteriaQuery<R> query, private <R> TypedQuery<R> createVesselQuery(CriteriaBuilder cb, CriteriaQuery<R> query,
Root<Vessel> vesselRoot, Root<Vessel> vesselRoot,
Join<Vessel, VesselFeatures> featuresJoin, Join<Vessel, VesselFeatures> featuresJoin,
Join<Vessel, VesselRegistrationPeriod> vrpJoin, Join<Vessel, VesselRegistrationPeriod> vrpJoin,
VesselFilterVO filter) { VesselFilterVO filter) {
if (filter != null) { if (filter != null) {
Join<Vessel, Program> programJoin = vesselRoot.join(Vessel.Fields.PROGRAM, JoinType.INNER);
// Apply vessel Filter // Apply vessel Filter
ParameterExpression<Date> dateParam = builder.parameter(Date.class); ParameterExpression<String> programParam = cb.parameter(String.class);
ParameterExpression<Integer> vesselIdParam = builder.parameter(Integer.class); ParameterExpression<Date> dateParam = cb.parameter(Date.class);
ParameterExpression<Integer> vesselFeaturesIdParam = builder.parameter(Integer.class); ParameterExpression<Integer> vesselIdParam = cb.parameter(Integer.class);
ParameterExpression<String> searchNameParam = builder.parameter(String.class); ParameterExpression<Integer> vesselFeaturesIdParam = cb.parameter(Integer.class);
ParameterExpression<String> searchExteriorMarkingParam = builder.parameter(String.class); ParameterExpression<String> searchNameParam = cb.parameter(String.class);
ParameterExpression<String> searchRegistrationCodeParam = builder.parameter(String.class); ParameterExpression<String> searchExteriorMarkingParam = cb.parameter(String.class);
ParameterExpression<Boolean> hasStatusIdsParam = builder.parameter(Boolean.class); ParameterExpression<String> searchRegistrationCodeParam = cb.parameter(String.class);
ParameterExpression<Collection> statusIdsParam = builder.parameter(Collection.class); ParameterExpression<Boolean> hasStatusIdsParam = cb.parameter(Boolean.class);
ParameterExpression<Collection> statusIdsParam = cb.parameter(Collection.class);
query.where(builder.and(
query.where(cb.and(
// Program
cb.or(
cb.isNull(programParam),
cb.equal(programJoin.get(Program.Fields.LABEL), programParam)
),
// Filter: date // Filter: date
builder.or( cb.or(
builder.and( cb.and(
// if no date in filter, will return only active period // if no date in filter, will return only active period
builder.isNull(dateParam.as(String.class)), cb.isNull(dateParam.as(String.class)),
builder.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)), cb.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)),
builder.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE)) cb.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE))
), ),
builder.and( cb.and(
builder.isNotNull(dateParam.as(String.class)), cb.isNotNull(dateParam.as(String.class)),
builder.and( cb.and(
builder.or( cb.or(
builder.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)), cb.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)),
builder.greaterThan(featuresJoin.get(VesselFeatures.Fields.END_DATE), dateParam) cb.greaterThan(featuresJoin.get(VesselFeatures.Fields.END_DATE), dateParam)
), ),
builder.lessThan(featuresJoin.get(VesselFeatures.Fields.START_DATE), dateParam) cb.lessThan(featuresJoin.get(VesselFeatures.Fields.START_DATE), dateParam)
), ),
builder.and( cb.and(
builder.or( cb.or(
builder.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE)), cb.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE)),
builder.greaterThan(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE), dateParam) cb.greaterThan(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE), dateParam)
), ),
builder.lessThan(vrpJoin.get(VesselRegistrationPeriod.Fields.START_DATE), dateParam) cb.lessThan(vrpJoin.get(VesselRegistrationPeriod.Fields.START_DATE), dateParam)
) )
) )
), ),
// Filter: vessel features id // Filter: vessel features id
builder.or( cb.or(
builder.isNull(vesselFeaturesIdParam), cb.isNull(vesselFeaturesIdParam),
builder.equal(featuresJoin.get(VesselFeatures.Fields.ID), vesselFeaturesIdParam) cb.equal(featuresJoin.get(VesselFeatures.Fields.ID), vesselFeaturesIdParam)
), ),
// Filter: vessel id // Filter: vessel id
builder.or( cb.or(
builder.isNull(vesselIdParam), cb.isNull(vesselIdParam),
builder.equal(vesselRoot.get(Vessel.Fields.ID), vesselIdParam)) cb.equal(vesselRoot.get(Vessel.Fields.ID), vesselIdParam))
), ),
// Filter: search text (on exterior marking OR id) // Filter: search text (on exterior marking OR id)
builder.or( cb.or(
builder.isNull(searchNameParam), cb.isNull(searchNameParam),
builder.like(builder.lower(featuresJoin.get(VesselFeatures.Fields.NAME)), searchNameParam), cb.like(cb.lower(featuresJoin.get(VesselFeatures.Fields.NAME)), searchNameParam),
builder.like(builder.lower(featuresJoin.get(VesselFeatures.Fields.EXTERIOR_MARKING)), searchExteriorMarkingParam), cb.like(cb.lower(featuresJoin.get(VesselFeatures.Fields.EXTERIOR_MARKING)), searchExteriorMarkingParam),
builder.like(builder.lower(vrpJoin.get(VesselRegistrationPeriod.Fields.REGISTRATION_CODE)), searchRegistrationCodeParam) cb.like(cb.lower(vrpJoin.get(VesselRegistrationPeriod.Fields.REGISTRATION_CODE)), searchRegistrationCodeParam)
), ),
// Status // Status
builder.or( cb.or(
builder.isFalse(hasStatusIdsParam), cb.isFalse(hasStatusIdsParam),
builder.in(vesselRoot.get(Vessel.Fields.STATUS).get(Status.Fields.ID)).value(statusIdsParam) cb.in(vesselRoot.get(Vessel.Fields.STATUS).get(Status.Fields.ID)).value(statusIdsParam)
) )
); );
...@@ -397,6 +406,7 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao { ...@@ -397,6 +406,7 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao {
: filter.getStatusIds(); : filter.getStatusIds();
return getEntityManager().createQuery(query) return getEntityManager().createQuery(query)
.setParameter(programParam, filter.getProgramLabel())
.setParameter(dateParam, filter.getDate()) .setParameter(dateParam, filter.getDate())
.setParameter(vesselFeaturesIdParam, filter.getVesselFeaturesId()) .setParameter(vesselFeaturesIdParam, filter.getVesselFeaturesId())
.setParameter(vesselIdParam, filter.getVesselId()) .setParameter(vesselIdParam, filter.getVesselId())
...@@ -410,9 +420,9 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao { ...@@ -410,9 +420,9 @@ public class VesselDaoImpl extends HibernateDaoSupport implements VesselDao {
// if no date in filter, will return only active period // if no date in filter, will return only active period
query.where( query.where(
builder.and( cb.and(
builder.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)), cb.isNull(featuresJoin.get(VesselFeatures.Fields.END_DATE)),
builder.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE)) cb.isNull(vrpJoin.get(VesselRegistrationPeriod.Fields.END_DATE))
) )
); );
......
...@@ -31,6 +31,7 @@ import net.sumaris.core.dao.referential.location.LocationRepository; ...@@ -31,6 +31,7 @@ import net.sumaris.core.dao.referential.location.LocationRepository;
import net.sumaris.core.dao.technical.Daos; import net.sumaris.core.dao.technical.Daos;
import net.sumaris.core.dao.technical.SortDirection; import net.sumaris.core.dao.technical.SortDirection;
import net.sumaris.core.dao.technical.hibernate.HibernateDaoSupport; import net.sumaris.core.dao.technical.hibernate.HibernateDaoSupport;
import net.sumaris.core.model.administration.programStrategy.Program;
import net.sumaris.core.model.data.Vessel; import net.sumaris.core.model.data.Vessel;
import net.sumaris.core.model.data.VesselFeatures; import net.sumaris.core.model.data.VesselFeatures;
import net.sumaris.core.model.data.VesselRegistrationPeriod; import net.sumaris.core.model.data.VesselRegistrationPeriod;
...@@ -99,6 +100,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel ...@@ -99,6 +100,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel
Root<VesselFeatures> root = query.from(VesselFeatures.class); Root<VesselFeatures> root = query.from(VesselFeatures.class);
Join<VesselFeatures, Vessel> vesselJoin = root.join(VesselFeatures.Fields.VESSEL, JoinType.INNER); Join<VesselFeatures, Vessel> vesselJoin = root.join(VesselFeatures.Fields.VESSEL, JoinType.INNER);
Join<Vessel, Program> programJoin = vesselJoin.join(Vessel.Fields.PROGRAM, JoinType.INNER);
Join<Vessel, VesselRegistrationPeriod> vrpJoin = vesselJoin.join(Vessel.Fields.VESSEL_REGISTRATION_PERIODS, JoinType.LEFT); Join<Vessel, VesselRegistrationPeriod> vrpJoin = vesselJoin.join(Vessel.Fields.VESSEL_REGISTRATION_PERIODS, JoinType.LEFT);
query.multiselect(root, vrpJoin); query.multiselect(root, vrpJoin);
...@@ -119,6 +121,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel ...@@ -119,6 +121,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel
: filter.getStatusIds(); : filter.getStatusIds();
// Apply vessel Filter // Apply vessel Filter
ParameterExpression<String> programParam = cb.parameter(String.class);
ParameterExpression<Date> dateParam = cb.parameter(Date.class); ParameterExpression<Date> dateParam = cb.parameter(Date.class);
ParameterExpression<Integer> vesselIdParam = cb.parameter(Integer.class); ParameterExpression<Integer> vesselIdParam = cb.parameter(Integer.class);
ParameterExpression<Integer> vesselFeaturesIdParam = cb.parameter(Integer.class); ParameterExpression<Integer> vesselFeaturesIdParam = cb.parameter(Integer.class);
...@@ -129,6 +132,12 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel ...@@ -129,6 +132,12 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel
ParameterExpression<Collection> statusIdsParam = cb.parameter(Collection.class); ParameterExpression<Collection> statusIdsParam = cb.parameter(Collection.class);
query.where(cb.and( query.where(cb.and(
// Program
cb.or(
cb.isNull(programParam),
cb.equal(programJoin.get(Program.Fields.LABEL), programParam)
),
// Filter: date // Filter: date
cb.or( cb.or(
cb.and( cb.and(
...@@ -189,6 +198,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel ...@@ -189,6 +198,7 @@ public class VesselSnapshotDaoImpl extends HibernateDaoSupport implements Vessel
String searchTextAnyMatch = StringUtils.isNotBlank(searchTextAsPrefix) ? ("%"+searchTextAsPrefix) : null; String searchTextAnyMatch = StringUtils.isNotBlank(searchTextAsPrefix) ? ("%"+searchTextAsPrefix) : null;
TypedQuery<VesselSnapshotResult> q = getEntityManager().createQuery(query) TypedQuery<VesselSnapshotResult> q = getEntityManager().createQuery(query)
.setParameter(programParam, filter.getProgramLabel())
.setParameter(dateParam, filter.getDate()) .setParameter(dateParam, filter.getDate())
.setParameter(vesselFeaturesIdParam, filter.getVesselFeaturesId()) .setParameter(vesselFeaturesIdParam, filter.getVesselFeaturesId())
.setParameter(vesselIdParam, filter.getVesselId()) .setParameter(vesselIdParam, filter.getVesselId())
......
...@@ -30,7 +30,7 @@ import java.util.List; ...@@ -30,7 +30,7 @@ import java.util.List;
@Data @Data
@FieldNameConstants @FieldNameConstants
public class VesselFilterVO { public class VesselFilterVO implements IRootDataFilter {
public static VesselFilterVO nullToEmpty(VesselFilterVO f) { public static VesselFilterVO nullToEmpty(VesselFilterVO f) {
return f != null ? f : new VesselFilterVO(); return f != null ? f : new VesselFilterVO();
...@@ -38,12 +38,30 @@ public class VesselFilterVO { ...@@ -38,12 +38,30 @@ public class VesselFilterVO {
private String programLabel; private String programLabel;
private Date date;
private Integer vesselId; private Integer vesselId;
private Integer vesselFeaturesId; private Integer vesselFeaturesId;
private String searchText; private String searchText;
private List<Integer> statusIds; private List<Integer> statusIds;
private Integer locationId; // TODO: use it in repository
private Integer recorderDepartmentId; // TODO: use it in repository
private Integer recorderPersonId; // TODO: use it in repository
private Date startDate;
private Date endDate; // TODO: use it in repository
public void setDate(Date date) {
this.startDate = date;
}
/**
* @deprecated use startDate instead
* @return
*/
@Deprecated
public Date getDate() {
return this.startDate;
}
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<artifactId>sumaris-server</artifactId> <artifactId>sumaris-server</artifactId>
......
...@@ -32,6 +32,7 @@ import net.sumaris.core.dao.technical.Page; ...@@ -32,6 +32,7 @@ import net.sumaris.core.dao.technical.Page;
import net.sumaris.core.dao.technical.Pageables; import net.sumaris.core.dao.technical.Pageables;
import net.sumaris.core.dao.technical.SortDirection; import net.sumaris.core.dao.technical.SortDirection;
import net.sumaris.core.dao.technical.model.IEntity; import net.sumaris.core.dao.technical.model.IEntity;
import net.sumaris.core.model.administration.programStrategy.ProgramEnum;
import net.sumaris.core.model.data.*; import net.sumaris.core.model.data.*;
import net.sumaris.core.service.data.*; import net.sumaris.core.service.data.*;
import net.sumaris.core.service.referential.pmfm.PmfmService; import net.sumaris.core.service.referential.pmfm.PmfmService;
...@@ -160,6 +161,12 @@ public class DataGraphQLService { ...@@ -160,6 +161,12 @@ public class DataGraphQLService {
@GraphQLArgument(name = "sortBy", defaultValue = VesselSnapshotVO.Fields.EXTERIOR_MARKING) String sort, @GraphQLArgument(name = "sortBy", defaultValue = VesselSnapshotVO.Fields.EXTERIOR_MARKING) String sort,
@GraphQLArgument(name = "sortDirection", defaultValue = "asc") String direction @GraphQLArgument(name = "sortDirection", defaultValue = "asc") String direction
) { ) {
// Filter on SIH program, when not an admin
if (!authService.isAdmin()) {
filter = VesselFilterVO.nullToEmpty(filter);
filter.setProgramLabel(ProgramEnum.SIH.getLabel());
}
return vesselService.findSnapshotByFilter( return vesselService.findSnapshotByFilter(
filter, filter,
offset, size, sort, offset, size, sort,
...@@ -175,6 +182,12 @@ public class DataGraphQLService { ...@@ -175,6 +182,12 @@ public class DataGraphQLService {
@GraphQLArgument(name = "sortBy") String sort, @GraphQLArgument(name = "sortBy") String sort,
@GraphQLArgument(name = "sortDirection", defaultValue = "asc") String direction @GraphQLArgument(name = "sortDirection", defaultValue = "asc") String direction
) { ) {
// Filter on SIH program, when not an admin
if (!authService.isAdmin()) {
filter = VesselFilterVO.nullToEmpty(filter);
filter.setProgramLabel(ProgramEnum.SIH.getLabel());
}
return vesselService.findVesselsByFilter( return vesselService.findVesselsByFilter(
filter, filter,
offset, size, sort, offset, size, sort,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>net.sumaris</groupId> <groupId>net.sumaris</groupId>
<artifactId>sumaris-pod</artifactId> <artifactId>sumaris-pod</artifactId>
<version>1.10.0</version> <version>1.10.1</version>
</parent> </parent>
<artifactId>sumaris-test-shared</artifactId> <artifactId>sumaris-test-shared</artifactId>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment