[Lada-commits] [PATCH 2 of 2] Use authorization in status service

Wald Commits scm-commit at wald.intevation.org
Wed Apr 13 18:46:47 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1460566003 -7200
# Node ID 83a7ef8d4f69b039b47d532b2dc4d96348c54fa8
# Parent  edb014e8045d624831f5f0fe5d4a68cb68f0aee6
Use authorization in status service.

diff -r edb014e8045d -r 83a7ef8d4f69 src/main/java/de/intevation/lada/rest/StatusService.java
--- 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) {


More information about the Lada-commits mailing list