mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
Allow for select-collection optimization to be disabled
Since there could be a potential edge case where the optimization falters We'll provide a simple fallback to revert to using the original query
This commit is contained in:
@@ -1506,6 +1506,11 @@ public class Collection extends DSpaceObject
|
||||
|
||||
public static Collection[] findAuthorizedOptimized(Context context, int actionID) throws java.sql.SQLException
|
||||
{
|
||||
if(! ConfigurationManager.getBooleanProperty("org.dspace.content.Collection.findAuthorizedPerformanceOptimize", true)) {
|
||||
// Fallback to legacy query if config says so. The rationale could be that a site found a bug.
|
||||
return findAuthorized(context, null, actionID);
|
||||
}
|
||||
|
||||
List<Collection> myResults = new ArrayList<Collection>();
|
||||
|
||||
if(AuthorizeManager.isAdmin(context))
|
||||
|
Reference in New Issue
Block a user