RM-2113 Ensure that the number of users returned in a query has an accurate total count.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103488 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2015-05-01 14:41:00 +00:00
parent 648fa3001c
commit 812753a249

View File

@@ -74,11 +74,16 @@ public class SecurityClearanceServiceImpl extends ServiceBaseImpl implements Sec
public PagingResults<SecurityClearance> getUsersSecurityClearance(UserQueryParams queryParams)
{
final PagingRequest pagingRequest = new PagingRequest(queryParams.getSkipCount(),
queryParams.getMaxItems());
// We want an accurate count of how many users there are in the system (in this query).
// Else paging in the UI won't work properly.
pagingRequest.setRequestTotalCountMax(Integer.MAX_VALUE);
final PagingResults<PersonInfo> p = personService.getPeople(queryParams.getSearchTerm(),
queryParams.getFilterProps(),
queryParams.getSortProps(),
new PagingRequest(queryParams.getSkipCount(),
queryParams.getMaxItems()));
pagingRequest);
return new PagingResults<SecurityClearance>()
{