changeset 921:83a7ef8d4f69

Use authorization in status service.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 18:46:43 +0200
parents edb014e8045d
children 48ca912c571e
files src/main/java/de/intevation/lada/rest/StatusService.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/StatusService.java	Wed Apr 13 18:45:58 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java	Wed Apr 13 18:46:43 2016 +0200
@@ -236,6 +236,15 @@
         if (lock.isLocked(messung)) {
             return new Response(false, 697, null);
         }
+
+        Response r = authorization.filter(
+            request,
+            new Response(true, 200, messung),
+            LMessung.class);
+        LMessung filteredMessung = (LMessung)r.getData();
+        if (filteredMessung.getStatusEdit() == false) {
+            return new Response(false, 699, null);
+        }
         boolean next = false;
         boolean change = false;
         if (messung.getStatus() == null) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)