From da498d0af59df1b7636275eea9dd582fd57818b8 Mon Sep 17 00:00:00 2001 From: Azmi TOUIL <42934070+AzmiTouil@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:37:22 +0100 Subject: [PATCH] fix: User (with a capital letter in the username) cannot post to a space from the global stream - MEED-7905 (#4259) Resolve case-sensitivity issue by changing member field type to keyword --- .../social/core/jpa/search/SpaceIndexingServiceConnector.java | 1 + .../org/exoplatform/social/core/space/SpaceListAccess.java | 2 +- .../conf/social-extension/social/indexing-configuration.xml | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java index 4bb229df2d0..715037d1f6b 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java +++ b/component/core/src/main/java/org/exoplatform/social/core/jpa/search/SpaceIndexingServiceConnector.java @@ -170,6 +170,7 @@ public String getMapping() { .append(" \"pending\" : {\"type\" : \"keyword\"},\n") .append(" \"invited\" : {\"type\" : \"keyword\"},\n") .append(" \"manager\" : {\"type\" : \"keyword\"},\n") + .append(" \"member\" : {\"type\" : \"keyword\"},\n") .append(" \"publisher\" : {\"type\" : \"keyword\"},\n") .append(" \"redactor\" : {\"type\" : \"keyword\"},\n") .append(" \"lastUpdatedDate\" : {\"type\" : \"date\", \"format\": \"epoch_millis\"}\n") diff --git a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java index 949725840d7..7ee20a38618 100644 --- a/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java +++ b/component/core/src/main/java/org/exoplatform/social/core/space/SpaceListAccess.java @@ -298,7 +298,7 @@ private SpaceSearchFilter getSpaceSearchFilter() { || type == ACCESSIBLE || type == VISIBLE || statusType != null)) { - return new SpaceSearchFilter(username.toLowerCase(), + return new SpaceSearchFilter(username, filter.getIdentityId(), filter.getTemplateId(), filter.getManagingTemplateIds(), diff --git a/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml index 02a724611de..3794ea614d6 100644 --- a/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml +++ b/webapp/src/main/webapp/WEB-INF/conf/social-extension/social/indexing-configuration.xml @@ -98,8 +98,8 @@ constructor.params - - + +