changeset 726:a5c755b0cfda

Filter the group string. This should be tidied...
author Dustin Demuth <dustin@intevation.de>
date Tue, 25 Aug 2015 10:49:31 +0200
parents a6a3edf472d5
children 2ba85d14160e
files pom.xml src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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>
--- 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();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)