[Lada-commits] [PATCH] Filter the group string. This should be tidied

Wald Commits scm-commit at wald.intevation.org
Tue Aug 25 11:00:23 CEST 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1440492571 -7200
# Node ID a5c755b0cfda4185683927a6b626ec609896d225
# Parent  a6a3edf472d5db52e7c3d889a0f9bd058457b26e
Filter the group string. This should be tidied...

diff -r a6a3edf472d5 -r a5c755b0cfda pom.xml
--- a/pom.xml	Fri Aug 14 11:05:59 2015 +0200
+++ b/pom.xml	Tue Aug 25 10:49:31 2015 +0200
@@ -275,5 +275,5 @@
             <url>http://www.hibernatespatial.org/repository</url>
         </repository>
     </repositories>
-    <version>2.1.1</version>
+    <version>dev-2.1.1</version>
 </project>
diff -r a6a3edf472d5 -r a5c755b0cfda src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java
--- a/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java	Fri Aug 14 11:05:59 2015 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java	Tue Aug 25 10:49:31 2015 +0200
@@ -227,7 +227,11 @@
         QueryBuilder<Auth> builder = new QueryBuilder<Auth>(
             repository.entityManager("stamm"),
             Auth.class);
-        builder.andIn("ldapGroup", Arrays.asList(roles.split(",")));
+        roles = roles.replace("[","");
+        roles = roles.replace("]","");
+        roles = roles.replace(" ","");
+        String[] mst = roles.split(",");
+        builder.andIn("ldapGroup", Arrays.asList(mst));
         Response response = repository.filter(builder.getQuery(), "stamm");
         @SuppressWarnings("unchecked")
         List<Auth> auth = (List<Auth>)response.getData();


More information about the Lada-commits mailing list