[Lada-commits] [PATCH 1 of 3] IDs should be equal, not just contain each other

Wald Commits scm-commit at wald.intevation.org
Wed Jun 1 15:29:03 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1464613268 -7200
# Node ID 0e9c4718196f97efff461ac0d002190131be1b26
# Parent  829092ba09f776d1d1d5bbb1991221c66e081f8f
IDs should be equal, not just contain each other.

diff -r 829092ba09f7 -r 0e9c4718196f src/main/java/de/intevation/lada/util/auth/UserInfo.java
--- a/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Fri May 27 19:20:47 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Mon May 30 15:01:08 2016 +0200
@@ -115,10 +115,9 @@
             if (a.getMstId() == null) {
                 continue;
             }
-            if (a.getMstId().contains(messstelle) ||
-                (a.getLaborMstId() != null &&
-                labor != null &&
-                a.getLaborMstId().contains(labor))) {
+            if (a.getMstId().equals(messstelle)
+                || (a.getLaborMstId() != null
+                    && a.getLaborMstId().equals(labor))) {
                 return true;
             }
         }


More information about the Lada-commits mailing list