🐞 Admin Portal > User attribute missing key#2634
Open
BelSequent wants to merge 2 commits intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes missing/incorrect display labels for Keycloak user attributes in the Admin Portal by improving how attribute labels are derived and by allowing tenant-specific localization overrides to apply even when the attribute key is not present in the default English translation bundle.
Changes:
- Improve
getAttributeLabelformatting to handle both camelCase and snake_case placeholders and to strip${profile.attributes.*}prefixes. - Update
getTranslationLabelto uset(key)+ “missing key” detection (fallback whentreturns the key) instead of checking presence in the default English translation object. - Document how to add localization overrides for custom user attribute labels in the Admin Portal.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/admin-portal/src/services/UserService.ts | Makes attribute label rendering more robust and ensures localization overrides can be used for custom attribute keys. |
| docs/docusaurus/docs/02-election_managers/01-tutorials/99-admin_portal_tutorials_add-user-attributes-to-keycloak.md | Adds guidance for overriding user attribute labels via tenant localization settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
(cherry picked from commit 7604b27)
| return translated | ||
| } | ||
| } | ||
| return getAttributeLabel(displayName ?? "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parent issue: https://github.com/sequentech/meta/issues/11994