Skip to content

Commit

Permalink
Make user list pagination more tolerant
Browse files Browse the repository at this point in the history
In case the server returns more results than expected by the limit, it
is now still interpreted as there being more results to query.

This situation can happen when there are multiple user backends in
place.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
  • Loading branch information
PVince81 committed Feb 5, 2021
1 parent e4bfbfe commit ccaa593
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/settings/js/vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/settings/js/vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/settings/src/store/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const actions = {
.then((response) => {
if (Object.keys(response.data.ocs.data.users).length > 0) {
context.commit('appendUsers', response.data.ocs.data.users)
return Object.keys(response.data.ocs.data.users).length === limit
return Object.keys(response.data.ocs.data.users).length >= limit
}
return false
})
Expand All @@ -237,7 +237,7 @@ const actions = {
.then((response) => {
if (Object.keys(response.data.ocs.data.users).length > 0) {
context.commit('appendUsers', response.data.ocs.data.users)
return Object.keys(response.data.ocs.data.users).length === limit
return Object.keys(response.data.ocs.data.users).length >= limit
}
return false
})
Expand Down

0 comments on commit ccaa593

Please sign in to comment.