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

67749: Merged DEV to HEAD-BUG-FIX (4.3.0.BF)
      64008: ACE-772: Topics from the sites the user is not a member of are displayed in My Discussions dashlet
         - Incorrect display of topics into "My Discussions" dashlet is fixed.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68384 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-04-30 16:02:10 +00:00
parent 2821d0afde
commit c351fa81e9

View File

@@ -403,7 +403,24 @@ public abstract class AbstractDiscussionWebScript extends DeclarativeWebScript
List<Map<String,Object>> items = new ArrayList<Map<String,Object>>();
for (TopicInfo topic : topics)
{
items.add(renderTopic(topic, site));
// ACE-772 fix of incorrect display of topics into "My Discussions" dashlet.
// Into "My Discussions" dashlet forum topic will be displayed only if user is a member of that site.
if (null == site && null != topic.getShortSiteName())
{
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
String siteShortName = topic.getShortSiteName();
boolean isSiteMember = siteService.isMember(siteShortName, currentUser);
if (isSiteMember)
{
items.add(renderTopic(topic, site));
}
}
// Display all topics on the forum of the site.
else
{
items.add(renderTopic(topic, site));
}
}
model.put("items", items);