Skip to content

Commit

Permalink
Merge branch 'hotfix/2021.1.5' into stable-2021.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PenghaiZhang committed Feb 11, 2022
2 parents dad59c0 + c177e4a commit 3873361
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ object PagedResults {
}

def getAvailable: Int = {
// It's acceptable to retrieve all because targeted BaseEntities are all small datasets.
val entities = getBaseEntities(0, -1)
filterByPermission(entities).length
// We only return the full number of available entities because filtering entities by ACL is very slow.
// Here is an example that would it.
// val entities = getBaseEntities(0, -1)
// filterByPermission(entities).length

res.getEntityService
.countAll(new EnumerateOptions(q, 0, -1, system, if (includeDisabled) null else false))
.toInt
}

def collectMore(length: Int, initialOffset: Int): (Int, List[PagedEntity[BE]]) = {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ name := "Equella"

equellaMajor in ThisBuild := 2021
equellaMinor in ThisBuild := 1
equellaPatch in ThisBuild := 4
equellaPatch in ThisBuild := 5
equellaStream in ThisBuild := "Stable"
equellaBuild in ThisBuild := buildConfig.value.getString("build.buildname")

Expand Down

0 comments on commit 3873361

Please sign in to comment.