Skip to content

Conversation

@sadilchamishka
Copy link
Contributor

@sadilchamishka sadilchamishka commented Nov 1, 2025

Purpose

  • Certain immutable attributes profile configurations has been hidden due to its complex combinations. It should be possible to enable them but with disabled mode with its status reflecting.
  • The console administrator view improved to use the newly introduced roles filter
  • UserId, created time and modified time is added for User filtering attributes.

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.

Screenshot 2025-11-01 at 12 15 57

User ID Attribute

Screenshot 2025-11-01 at 12 21 29

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.

Screenshot 2025-11-01 at 12 23 15

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.

Screenshot 2025-11-01 at 12 26 43

Copilot AI review requested due to automatic review settings November 1, 2025 04:13
Copy link
Contributor

Copilot AI left a 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.

@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.88%. Comparing base (6684e79) to head (1293647).
⚠️ Report is 59 commits behind head on master.

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     
Flag Coverage Δ
@wso2is/core 55.88% <ø> (+7.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sadilchamishka
Copy link
Contributor Author

The console administrator view is updated to invoke the users API with new roles filter.

https://localhost:9443/scim2/Users?count=11&domain=PRIMARY&excludedAttributes=groups&filter=roles.audienceId+eq+411f4c76-e8c9-4dbe-9e3f-d540dd0e839e&startIndex=1

Screenshot 2025-11-03 at 00 16 10

@sadilchamishka
Copy link
Contributor Author

sadilchamishka commented Nov 2, 2025

User ID, Created Time & Modified Time are fields of the user which is supported by default, hence those should be reflected in the filtering attributes.

Screenshot 2025-11-03 at 00 18 25 Screenshot 2025-11-03 at 00 20 58

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