Skip to content

fix(groups): show a group's display name after it is renamed - #67058

Open
adityawrk wants to merge 1 commit into
nextcloud:masterfrom
adityawrk:group-display-name
Open

adityawrk wants to merge 1 commit into
nextcloud:masterfrom
adityawrk:group-display-name

Conversation

@adityawrk

Copy link
Copy Markdown

Summary

Renaming a group updates displayname and leaves the gid as the original name. Several pickers still rendered that gid, and the group manager's display-name cache was never subscribed to GroupChangedEvent, so getDisplayName() kept the previous name until the distributed entry expired. Share autocomplete uses that cache for the label.

  • The manager cache now listens for group rename and delete.
  • OC\Group\Database::setDisplayName() refreshes its in-request map, which getDisplayName() prefers.
  • Group search matches the gid and the display name in one OR predicate.
  • The app-store limit dialog and the two-factor group picker load /cloud/groups/details and show displayname. Saved values stay the gid.

TODO

  • Unit coverage for the cache update, a same-request rename, and share search by display name

Checklist

PHP syntax check passed on the changed PHP files. PHPUnit and a live instance were not run here; the server test bootstrap is not available in this environment.

AI (if applicable)

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

Assisted-by: Cursor:grok-4.7

Made with Cursor

Renaming a group changes displayname and leaves the gid as the original
name. Dropdowns that listed /cloud/groups rendered that gid, and the
group manager's display-name cache never heard GroupChangedEvent, so
share search and the users API kept the previous name.

Register that cache on the manager, refresh the backend map in the same
request, and make the app and two-factor pickers use the details API.

Fixes nextcloud#58088

Signed-off-by: Aditya <152765789+adityawrk@users.noreply.github.com>
Assisted-by: Cursor:grok-4.7
@adityawrk
adityawrk requested review from a team as code owners November 26, 2026 23:54
@adityawrk
adityawrk requested review from artonge, come-nc, kristian-zendato, provokateurin and susnux and removed request for a team November 26, 2026 23:54
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T23:54:59.185849Z
We couldn’t complete this review. Comment @codex review to try again.
037e371 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Renamed User Groups are still shown with the old name in dropdowns

1 participant