Remove fixed limit of results returned by secondary index query

The global query limit capability can be set to any value in the
project settings, however in the query implementation the limit
is hard coded to 1000.

Remove the hard-coded limit so that the limit specified in the
global capability is honoured.

Bug: Issue 2879
Change-Id: I9974f43da7cf9902b7e46607d44abc7383f77ecd
This commit is contained in:
David Pursehouse
2014-09-03 11:52:04 +09:00
parent b8bb7c1109
commit dcd2fd364e
3 changed files with 10 additions and 16 deletions

View File

@@ -70,6 +70,9 @@ public class GlobalCapability {
/** Maximum result limit per executed query. */
public static final String QUERY_LIMIT = "queryLimit";
/** Default result limit per executed query. */
public static final int DEFAULT_MAX_QUERY_LIMIT = 500;
/** Ability to impersonate another user. */
public static final String RUN_AS = "runAs";
@@ -145,7 +148,7 @@ public class GlobalCapability {
return new PermissionRange.WithDefaults(
varName,
0, Integer.MAX_VALUE,
0, 500);
0, DEFAULT_MAX_QUERY_LIMIT);
}
return null;
}