Bulk applying permission templates is restricted to 1'000 projects because of a limitation in the SQL request to load projects (see ComponentDao#selectByQuery() with list of components).
This restriction should be removed.
One of the three solutions could be used, they should be tested to see which one is better performance-wise.
1. Break the list into sub lists of 1000 items max and make a request for each sub list
2. The 1000 limitation applies to a single IN statement. So multiple IN statement can be combine with OR conditions:
3. Limitation applies only to single values, not to tuple. So a constant value could be added to create tuples and therefore not be limited to 1000 values: