From a0f7f83fc64058522defb0d27a3139ddae6d67e5 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 12 Dec 2018 15:49:50 +0100
Subject: [PATCH] ldap login is case insensitive, but in our system such logins
 are lowercased

---
 .../main/java/lcsb/mapviewer/services/impl/UserService.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/service/src/main/java/lcsb/mapviewer/services/impl/UserService.java b/service/src/main/java/lcsb/mapviewer/services/impl/UserService.java
index 119bc9a9e0..3e45c9a29b 100644
--- a/service/src/main/java/lcsb/mapviewer/services/impl/UserService.java
+++ b/service/src/main/java/lcsb/mapviewer/services/impl/UserService.java
@@ -616,8 +616,9 @@ public class UserService implements IUserService {
       try {
         List<String> ldapUserNames = getLdapService().getUsernames();
         for (String string : ldapUserNames) {
-          if (result.keySet().contains(string)) {
-            result.put(string, true);
+          String ldapLogin = string.toLowerCase();
+          if (result.keySet().contains(ldapLogin)) {
+            result.put(ldapLogin, true);
           }
         }
       } catch (LDAPException e) {
-- 
GitLab