changeset 906:22052e4808c0

Fixed authorization. Avoids NPE for users/roles without mst_id
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 06 Apr 2016 12:19:31 +0200
parents 9293d37c65f7
children ca1af8bbfe1f
files src/main/java/de/intevation/lada/util/auth/UserInfo.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Mon Mar 14 10:18:24 2016 +0100
+++ b/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Wed Apr 06 12:19:31 2016 +0200
@@ -106,6 +106,9 @@
 
     public boolean belongsTo(String messstelle, String labor) {
         for (Auth a : auth) {
+            if (a.getMstId() == null) {
+                continue;
+            }
             if (a.getMstId().contains(messstelle) &&
                 a.getLaborMstId() != null &&
                 labor != null &&
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)