Opened 4 weeks ago
#64657 new defect (bug)
Add `core/get-user` ability
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | AI | Keywords: | |
| Focuses: | Cc: |
Description
Introduce a new Abilities API ability, core/get-user, to retrieve profile data for a specific user by id, username, or email.
Core currently has core/get-user-info for the current authenticated user only (and not exposed in REST). Agent/workflows use cases need to be able to look up any user when permissions allow it.
Proposed behavior
- Register
core/get-userin theuserability category. - Input schema:
- Require one of:
id(integer),username(string), oremail(string). - Optional:
include_capabilities(boolean, defaultfalse).
- Require one of:
- Output schema includes:
id,username,email,display_name,first_name,last_name,nickname,description,url,link,slug,registered_date,roles,locale,avatar_urls.- Optional
capabilitieswheninclude_capabilitiesis true.
- Permission model:
- User must be logged in.
- Users can view their own record.
- Viewing other users requires
list_users.
- Expose the ability in REST (
show_in_resttrue). - Return
user_not_founderror when no matching user exists.
Notes / follow-ups
- This ticket scopes the initial profile payload.
- Follow-up can extend response data (for example, registered user meta with schema).
References
Note: See
TracTickets for help on using
tickets.