Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

96471: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud)
      96358: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2)
         95704: Merged DEV to V4.2-BUG-FIX (4.2.5)
            94398: MNT-13234 : Duplicate activities in activities feed
               - Changed getFollowers() method with implementing username case sensitive specific, like it done in getSiteMembers() method.
            94483: MNT-13234: Duplicate activities in activities feed
               - Added test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@96500 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-02-07 10:32:33 +00:00
parent a069bf7000
commit bc748b7f22
2 changed files with 13 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -371,7 +371,7 @@ public abstract class FeedTaskProcessor
{
try
{
followerUsers = getFollowers(postUserId, tenantDomain);
followerUsers = getFollowers(ctx, postUserId, tenantDomain);
}
catch(Exception e)
{
@@ -525,7 +525,7 @@ public abstract class FeedTaskProcessor
return members;
}
protected abstract Set<String> getFollowers(String userId, String tenantDomain) throws Exception;
protected abstract Set<String> getFollowers(RepoCtx ctx, String userId, String tenantDomain) throws Exception;
protected abstract boolean canReadSite(final RepoCtx ctx, String siteIdIn, String connectedUser, final String tenantDomain) throws Exception;
protected abstract boolean canRead(RepoCtx ctx, final String connectedUser, Map<String, Object> model) throws Exception;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -600,7 +600,7 @@ public class LocalFeedTaskProcessor extends FeedTaskProcessor implements Applica
return documentPaths;
}
protected Set<String> getFollowers(final String userId, String tenantDomain) throws Exception
protected Set<String> getFollowers(final RepoCtx ctx, final String userId, String tenantDomain) throws Exception
{
if (useRemoteCallbacks)
{
@@ -620,7 +620,14 @@ public class LocalFeedTaskProcessor extends FeedTaskProcessor implements Applica
if (fr.getPage() != null)
{
result.addAll(fr.getPage());
for (String followerUserName : fr.getPage())
{
if (!ctx.isUserNamesAreCaseSensitive())
{
followerUserName = followerUserName.toLowerCase();
}
result.add(followerUserName);
}
}
return null;