-
Notifications
You must be signed in to change notification settings - Fork 335
Refactor immutable attribute configuration view and improve administrator listing in the console settings page #9418
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the handling of immutable/system attributes (user ID, created date, modified date) in the console and optimizes administrator user fetching by moving filtering to the API level instead of client-side.
- Adds filtering logic to fetch only users with console roles at the API level, replacing client-side filtering
- Makes immutable attributes (id, created, modified) configurable with custom display names when default labels are disabled
- Updates claim management to properly handle special claims (created, modified) with appropriate visibility and editability rules
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| features/admin.console-settings.v1/hooks/use-administrators.ts | Refactored to filter administrators at API level using console role audience ID instead of client-side filtering |
| features/admin.users.v1/components/user-profile/user-profile-form.tsx | Added support for custom labels on immutable fields (id, created, modified) and filtering logic to prevent duplicate rendering |
| features/admin.claims.v1/constants/claim-management-constants.ts | Added constants for created and modified claim URIs |
| features/admin.claims.v1/components/edit/local-claim/edit-basic-details-local-claims.tsx | Refactored claim edit form to properly handle immutable claims with correct visibility and editability rules |
| .changeset/large-chefs-fail.md | Changelog entry for the refactoring changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
features/admin.users.v1/components/user-profile/user-profile-form.tsx
Outdated
Show resolved
Hide resolved
features/admin.claims.v1/components/edit/local-claim/edit-basic-details-local-claims.tsx
Outdated
Show resolved
Hide resolved
features/admin.claims.v1/components/edit/local-claim/edit-basic-details-local-claims.tsx
Outdated
Show resolved
Hide resolved
features/admin.claims.v1/components/edit/local-claim/edit-basic-details-local-claims.tsx
Outdated
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9418 +/- ##
==========================================
+ Coverage 48.75% 55.88% +7.12%
==========================================
Files 42 42
Lines 1003 1020 +17
Branches 250 247 -3
==========================================
+ Hits 489 570 +81
+ Misses 514 416 -98
- Partials 0 34 +34
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…c-details-local-claims.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>



Purpose
Related Issues
Only Description can be updated for those immutable claims.
If
"users.profile.useDefaultLabelsAndOrder"configuration is enabled, it is possible to update the display name of the username attribute which will be reflected in the user profile in console and myaccount.The above configuration is introduced with wso2/product-is#24906 and this PR honors the configuration and only allow to edit display name for immutable attributes if the configuration is enabled.
But irrespective of the configuration, the immutable attribute's attribute configurations are displayed with disabled mode for the respective fields ensuring the state of the console, myaccount and self registration portals of the product.
Username attribute
The console and myaccount displays the username by default. The self registration requires username. Though we have new registration flow composer which can skip username, the default registration template mark username as necessary hence it is reflected from this attribute configs.
User ID Attribute
Created Time Attribute
End user portal doesn't show the user created time at the moment. It can be enabled if required if that information is relevant for the profile.
Location Attribute
This is an immutable attribute which keep the URI for the user resource. If it requires to be enabled, the profile configurations are given.