mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user