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/BRANCHES/DEV/5.2.N/root@134808 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2017-01-30 10:02:38 +00:00
parent 75c8ee0ae5
commit 04c6028147
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);
}