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