comparison src/main/java/de/intevation/lada/rest/LStatusService.java @ 261:07c4186cbfab

Enable read access on all objects for authorized users.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 16 Jul 2013 11:18:05 +0200
parents 4810071c364c
children 2098db2e8fbd
comparison
equal deleted inserted replaced
260:0de24f5e7c01 261:07c4186cbfab
74 !params.containsKey("probeId") || 74 !params.containsKey("probeId") ||
75 !params.containsKey("messungsId")) { 75 !params.containsKey("messungsId")) {
76 return new Response(false, 609, new ArrayList<LStatus>()); 76 return new Response(false, 609, new ArrayList<LStatus>());
77 } 77 }
78 String probeId = params.getFirst("probeId"); 78 String probeId = params.getFirst("probeId");
79 if (authentication.hasAccess(headers, probeId)) { 79 QueryBuilder<LStatus> builder =
80 QueryBuilder<LStatus> builder = 80 new QueryBuilder<LStatus>(
81 new QueryBuilder<LStatus>( 81 repository.getEntityManager(), LStatus.class);
82 repository.getEntityManager(), LStatus.class); 82 builder.and("probeId", probeId)
83 builder.and("probeId", probeId) 83 .and("messungsId", params.getFirst("messungsId"));
84 .and("messungsId", params.getFirst("messungsId")); 84 return repository.filter(builder.getQuery());
85 return repository.filter(builder.getQuery());
86 }
87 return new Response(false, 698, new ArrayList<LStatus>());
88 } 85 }
89 catch(AuthenticationException ae) { 86 catch(AuthenticationException ae) {
90 return new Response(false, 699, new ArrayList<LStatus>()); 87 return new Response(false, 699, new ArrayList<LStatus>());
91 } 88 }
92 } 89 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)