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

134803 mward: Merged mward/repo-1600-zonesfilter (5.2.1) to 5.2.N (5.2.1)
      134681 mward: REPO-1600: unknown zone results in 404


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2017-06-14 16:59:48 +00:00
parent 9b3b01297b
commit 9acc059b35
2 changed files with 13 additions and 1 deletions

View File

@@ -216,7 +216,15 @@ public class GroupsImpl implements Groups
final AuthorityType authorityType = AuthorityType.GROUP;
final Set<String> rootAuthorities = getAllRootAuthorities(authorityType);
PagingResults<AuthorityInfo> pagingResult = getAuthoritiesInfo(authorityType, isRootParam, zoneFilter, rootAuthorities, sortProp, paging);
PagingResults<AuthorityInfo> pagingResult;
try
{
pagingResult = getAuthoritiesInfo(authorityType, isRootParam, zoneFilter, rootAuthorities, sortProp, paging);
}
catch (UnknownAuthorityException e)
{
throw new EntityNotFoundException("Zone "+zoneFilter+" does not exist.");
}
// Create response.
final List<AuthorityInfo> page = pagingResult.getPage();

View File

@@ -435,6 +435,10 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
// "A series of unfortunate errors"
otherParams.put("where", "(zones in ('', 'APP.DEFAULT', '', 'APITEST.MYZONE'))");
getGroups(paging, otherParams, "Incorrect response", 400);
// A zone that isn't in use or doesn't exist
otherParams.put("where", "(zones in ('NON.EXISTENT'))");
getGroups(paging, otherParams, "Incorrect response", 404);
}
}