Skip to content

fix(provisioning_api): filter users by enabled state on the server - #65468

Open
SebastianKrupinski wants to merge 1 commit into
masterfrom
fix/issue-47114-active-accounts-list
Open

SebastianKrupinski wants to merge 1 commit into
masterfrom
fix/issue-47114-active-accounts-list

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Resolves: [Bug]: Active Account List Break if 1/3 of Total Accounts are Disabled #47114

  • Resolves: Client Ticket

  • The account list in settings fetched pages that included disabled accounts and hid them in the browser. Loading the next page is only triggered when the list footer becomes visible, so when most accounts on a page were disabled the footer never left the viewport and the "Active accounts", group and "Recent accounts" views stopped loading.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@SebastianKrupinski SebastianKrupinski added this to the Nextcloud 36 milestone Oct 13, 2026
@SebastianKrupinski SebastianKrupinski self-assigned this Oct 13, 2026
@SebastianKrupinski
SebastianKrupinski requested a review from a team as a code owner October 13, 2026 14:28
@SebastianKrupinski SebastianKrupinski added the 3. to review Waiting for reviews label Oct 13, 2026
@SebastianKrupinski
SebastianKrupinski requested review from kristian-zendato, pringelmann and skjnldsv and removed request for a team October 13, 2026 14:28
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/compile

@pringelmann

Copy link
Copy Markdown
Contributor

I'm honestly not sure this should be fixed in the client. The server builds full details for every disabled user just so we can hide them, and the loop multiplies that. Most of the inline issues also go away without a client-side loop.

Maybe we could add an opt-in enabled=true param to /cloud/users/details instead? The server skips disabled users until it has a full page and returns the next offset in the Link header.

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

Maybe we could add an opt-in enabled=true param to /cloud/users/details instead? The server skips disabled users until it has a full page and returns the next offset in the Link header.

Sure, I was just going for the smallest fix, but the backend fix is better

@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-47114-active-accounts-list branch from ce84c9c to b0c504e Compare October 16, 2026 12:52
@SebastianKrupinski
SebastianKrupinski requested review from Altahrim, CarlSchwan and salmart-dev and removed request for a team October 16, 2026 12:52
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-47114-active-accounts-list branch from b0c504e to a31e2f8 Compare October 16, 2026 13:42
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-47114-active-accounts-list branch from a31e2f8 to b916a6a Compare October 16, 2026 13:44
@SebastianKrupinski SebastianKrupinski changed the title fix(settings): keep loading accounts when a page is mostly hidden fix(provisioning_api): filter users by enabled state on the server Oct 16, 2026
$count = 0;
foreach ($search($limit, $offset) as $user) {
$count++;
$offset++;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might skip users when there's more than one user backend (e.g. LDAP + Database), since search() pages each backend separately but the offset here counts the merged result. Could you double check?

@pringelmann

Copy link
Copy Markdown
Contributor

Thank you for the extra effort to improve this by moving it to the server! Just one comment on limit/offset handling on multiple backends...but otherwise looks good :)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

[Bug]: Active Account List Break if 1/3 of Total Accounts are Disabled

2 participants