[Lada-commits] [PATCH] Allow GET for status objects with messungsId
Wald Commits
scm-commit at wald.intevation.org
Wed Feb 3 13:34:27 CET 2016
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1454502872 -3600
# Node ID 7c6b7c08d31d25a85f1ffc8e077a333496921581
# Parent 0e895f13f0b69e2e5e10ca0c4b4e0b464f6487da
Allow GET for status objects with messungsId.
diff -r 0e895f13f0b6 -r 7c6b7c08d31d src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java Tue Feb 02 15:33:24 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java Wed Feb 03 13:34:32 2016 +0100
@@ -147,23 +147,12 @@
catch(NumberFormatException nfe) {
return new Response(false, 698, null);
}
- LMessung messung = defaultRepo.getByIdPlain(
- LMessung.class,
- id,
- "land");
- if (!authorization.isAuthorized(
- request,
- messung,
- RequestMethod.GET,
- LMessung.class)) {
- return new Response(false, 697, null);
- }
QueryBuilder<LStatusProtokoll> builder =
new QueryBuilder<LStatusProtokoll>(
defaultRepo.entityManager("land"),
LStatusProtokoll.class);
- builder.and("messungsId", messungId);
+ builder.and("messungsId", id);
return authorization.filter(
request,
defaultRepo.filter(builder.getQuery(), "land"),
More information about the Lada-commits
mailing list