Merged DEV to HEAD (4.2)

54389: ALF-15547 : Stack specific:Incorrect work of My Activities dashlet
   Added a check for siteNetwork to be null in activity feed entry.
   Added JUnit test.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54663 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alex Mukha
2013-08-29 15:08:20 +00:00
parent 192e98ff50
commit c6bcff73df
2 changed files with 71 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -430,11 +430,11 @@ public class ActivityServiceImpl implements ActivityService, InitializingBean
}
continue;
}
String siteNetwork = activityFeed.getSiteNetwork();
if (siteId == null)
{
// note: pending requirements for THOR-224, for now assume all activities are within context of site and filter by current tenant
if (! currentTenantDomain.equals(tenantService.getDomain(activityFeed.getSiteNetwork())))
if (siteNetwork != null && !currentTenantDomain.equals(tenantService.getDomain(siteNetwork)))
{
continue;
}
@@ -478,7 +478,7 @@ public class ActivityServiceImpl implements ActivityService, InitializingBean
activityFeed.setPostUserAvatarNodeRef(avatarNodeRef);
activityFeed.setSiteNetwork(tenantService.getBaseName(activityFeed.getSiteNetwork()));
activityFeed.setSiteNetwork(tenantService.getBaseName(siteNetwork));
result.add(activityFeed);
if (logger.isTraceEnabled())
{