Merged 5.2.N (5.2.2) to HEAD (5.2)

134808 mward: Merged mward/repo-1600-zonesfilter (5.2.1) to 5.2.N (5.2.1)
      134762 mward: REPO-1583: added include=parentIds support


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137367 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2017-06-14 17:00:25 +00:00
parent 0fd7bcfa2b
commit 62a45db93d
2 changed files with 40 additions and 1 deletions

View File

@@ -541,7 +541,14 @@ public class GroupsImpl implements Groups
{
if (includeParam.contains(PARAM_INCLUDE_PARENT_IDS))
{
Set<String> containingAuthorities = authorityService.getContainingAuthorities(AuthorityType.GROUP, authorityInfo.getAuthorityName(), true);
String authority = authorityInfo.getAuthorityName();
Set<String> containingAuthorities = Collections.emptySet();
// Workaround for AuthorityDAO.listAuthorities, where although AuthorityType.GUEST
// is a special case, AuthorityType.EVERYONE is not, and an exception is thrown.
if (!authority.equalsIgnoreCase(PermissionService.ALL_AUTHORITIES))
{
containingAuthorities = authorityService.getContainingAuthorities(AuthorityType.GROUP, authority, true);
}
group.setParentIds(containingAuthorities);
}