Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KEYCLOAK-18423 user friendly name for user profile attributes #8190

Conversation

velias
Copy link
Contributor

@velias velias commented Jun 21, 2021

Based on top of the PR #8179 to prevent merge conflicts as it changes same files, so should be merged after it (I'll rebase this PR once parent is merged).
Few notes:

  • I used advancedMsg freemarker method to render field name in login theme (used in verify-profile.ftl for now) as it supports i18n replacers in an east way. The method is now added always to the freemarker context beside common msg (before it was added for one page type only)
  • possibility to set displayName added to the Admin GUI editor, and also shown in the list of attributes so admin has common overview
  • Attribute names are correctly rendered into new account console error messages
  • User update error messages rendering kept as is for the Admin Console - attribute name (no display name) is shown here still as it is also used in attributes list in GUI. Expected improvement in new Admin console as user profile page will be cleared. But I moved admin message rendering code out of ValidationException into Admin REST API resource to clean internal architecture a bit.
  • tests implemented both for JSON config parsing and to verify correct rendering of the names in verify-profile.ftl
  • created UserProfileBeanBase with code which can be reused for all login templates working with user profile (registration, user update)

@pedroigor hope given changes make sense to you

@velias velias force-pushed the KEYCLOAK-18423_user_friendly_name_for_attributes branch from 6286a68 to 4422b70 Compare June 21, 2021 15:16
@velias velias changed the title Keycloak 18423 user friendly name for attributes KEYCLOAK-18423 user friendly name for user profile attributes Jun 22, 2021
@velias velias force-pushed the KEYCLOAK-18423_user_friendly_name_for_attributes branch 3 times, most recently from a7c5a34 to 6d11d44 Compare June 23, 2021 12:30
@velias velias force-pushed the KEYCLOAK-18423_user_friendly_name_for_attributes branch from 6d11d44 to fe9fb18 Compare June 24, 2021 06:14
@pedroigor pedroigor merged commit b7a4fd8 into keycloak:master Jun 24, 2021
@velias velias deleted the KEYCLOAK-18423_user_friendly_name_for_attributes branch June 24, 2021 14:52
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.

2 participants