Skip to content

Commit bfbe639

Browse files
committed
Merge branch 'hotfix/2021.2.3'
2 parents cbbf3bd + aaaa68b commit bfbe639

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
functional_testing:
195195
needs: build_and_check
196196

197-
runs-on: ubuntu-18.04
197+
runs-on: ubuntu-latest
198198

199199
strategy:
200200
matrix:

Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/entity/PagedResults.scala

+8-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@ object PagedResults {
8181
}
8282

8383
def getAvailable: Int = {
84-
// It's acceptable to retrieve all because targeted BaseEntities are all small datasets.
85-
val entities = getBaseEntities(0, -1)
86-
filterByPermission(entities).length
84+
// We only return the full number of available entities because filtering entities by ACL is very slow.
85+
// Here is an example that would it.
86+
// val entities = getBaseEntities(0, -1)
87+
// filterByPermission(entities).length
88+
89+
res.getEntityService
90+
.countAll(new EnumerateOptions(q, 0, -1, system, if (includeDisabled) null else false))
91+
.toInt
8792
}
8893

8994
def collectMore(length: Int, initialOffset: Int): (Int, List[PagedEntity[BE]]) = {

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ name := "Equella"
115115

116116
(ThisBuild / equellaMajor) := 2021
117117
(ThisBuild / equellaMinor) := 2
118-
(ThisBuild / equellaPatch) := 2
118+
(ThisBuild / equellaPatch) := 3
119119
(ThisBuild / equellaStream) := "Stable"
120120
(ThisBuild / equellaBuild) := buildConfig.value.getString("build.buildname")
121121
(ThisBuild / buildTimestamp) := Instant.now().getEpochSecond

0 commit comments

Comments
 (0)