MNT-16565 : [Site Activities] Group identifier appears instead of group name when changing the group's role

- Fixed activity dashlet display in case of role changed for group.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@128834 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ramona Neamtu
2016-07-20 15:24:53 +00:00
parent 5eccebc6ed
commit 76b6356a41

View File

@@ -2523,39 +2523,43 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
}
}, AuthenticationUtil.SYSTEM_USER_NAME);
if (currentRole == null)
{
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
if (authorityType == AuthorityType.USER)
{
activityService.postActivity(
ActivityType.SITE_USER_JOINED, shortName,
ACTIVITY_TOOL, getActivityUserData(authorityName, role), authorityName);
}
else if (authorityType == AuthorityType.GROUP)
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
String authorityDisplayName = authorityName;
if (authorityType == AuthorityType.GROUP)
{
authorityDisplayName = authorityService.getAuthorityDisplayName(authorityName);
}
if (currentRole == null)
{
if (authorityType == AuthorityType.USER)
{
activityService.postActivity(
ActivityType.SITE_USER_JOINED, shortName,
ACTIVITY_TOOL, getActivityUserData(authorityDisplayName, role), authorityName);
}
else if (authorityType == AuthorityType.GROUP)
{
String authorityDisplayName = authorityService.getAuthorityDisplayName(authorityName);
activityService.postActivity(
ActivityType.SITE_GROUP_ADDED, shortName,
ACTIVITY_TOOL, getActivityGroupData(authorityDisplayName, role));
}
}
else
{
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
if (authorityType == AuthorityType.USER)
{
activityService.postActivity(
ActivityType.SITE_USER_ROLE_UPDATE, shortName,
ACTIVITY_TOOL, getActivityUserData(authorityName, role));
}
else if (authorityType == AuthorityType.GROUP)
{
activityService.postActivity(
ActivityType.SITE_GROUP_ROLE_UPDATE, shortName,
ACTIVITY_TOOL, getActivityGroupData(authorityName, role));
}
activityService.postActivity(
ActivityType.SITE_GROUP_ADDED, shortName,
ACTIVITY_TOOL, getActivityGroupData(authorityDisplayName, role));
}
}
else
{
if (authorityType == AuthorityType.USER)
{
activityService.postActivity(
ActivityType.SITE_USER_ROLE_UPDATE, shortName,
ACTIVITY_TOOL, getActivityUserData(authorityDisplayName, role));
}
else if (authorityType == AuthorityType.GROUP)
{
activityService.postActivity(
ActivityType.SITE_GROUP_ROLE_UPDATE, shortName,
ACTIVITY_TOOL, getActivityGroupData(authorityDisplayName, role));
}
}
}
else