Skip to content

fix(settings): show group display names in the 2FA group picker - #63867

Draft
NikolausDemmel wants to merge 1 commit into
nextcloud:masterfrom
NikolausDemmel:fix-2fa-group-picker-63760
Draft

fix(settings): show group display names in the 2FA group picker#63867
NikolausDemmel wants to merge 1 commit into
nextcloud:masterfrom
NikolausDemmel:fix-2fa-group-picker-63760

Conversation

@NikolausDemmel

Copy link
Copy Markdown

AdminTwoFactor.vue's "Enforced groups"/"Excluded groups" pickers fetched cloud/groups, which only returns a group's raw ID - so a group with a friendly display name but an opaque ID (e.g. one created by an app via IGroupManager::createGroup()) rendered as that opaque ID, with no way to visually confirm it's the right group.

Switch to cloud/groups/details (id + displayname, already used elsewhere for the same purpose, e.g. RequestUserGroup.vue) and render via NcSelect's label prop. Also fetch by ID for any already-enforced/ excluded group missing from the initial page, so a previously configured group whose ID doesn't sort into the first page still resolves to a real display name - and remains selectable at all in the "excluded" input, since NcSelect can only show options present in :options.

The initial page's ORDER BY gid ASC + fixed limit=20 (so an unfiltered load can still omit some groups entirely) is unchanged - that's shared with every other group picker using this pattern and out of scope here; search by display name already works today regardless.

Assisted-by: ClaudeCode:claude-sonnet-5

  • Resolves: #

Summary

TODO

  • ...

Checklist

AI (if applicable)

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

AdminTwoFactor.vue's "Enforced groups"/"Excluded groups" pickers
fetched cloud/groups, which only returns a group's raw ID - so a
group with a friendly display name but an opaque ID (e.g. one created
by an app via IGroupManager::createGroup()) rendered as that opaque
ID, with no way to visually confirm it's the right group.

Switch to cloud/groups/details (id + displayname, already used
elsewhere for the same purpose, e.g. RequestUserGroup.vue) and render
via NcSelect's label prop. Also fetch by ID for any already-enforced/
excluded group missing from the initial page, so a previously
configured group whose ID doesn't sort into the first page still
resolves to a real display name - and remains selectable at all in
the "excluded" input, since NcSelect can only show options present in
:options.

The initial page's ORDER BY gid ASC + fixed limit=20 (so an
unfiltered load can still omit some groups entirely) is unchanged -
that's shared with every other group picker using this pattern and
out of scope here; search by display name already works today
regardless.

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Nikolaus Demmel <nikolaus@nikolaus-demmel.de>
@NikolausDemmel
NikolausDemmel force-pushed the fix-2fa-group-picker-63760 branch from 2763746 to dbf2923 Compare August 31, 2026 23:26
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.

1 participant