Skip to content

Commit bc65105

Browse files
baozhoutaoclaude
andauthored
feat(platform-objects): surface phone number in create_user result dialog (#3261)
The create-user response's `user` object carries `phoneNumber` only for phone-based accounts (admin-user-endpoints.ts builds it conditionally). Declaring it is safe now that objectui's ActionResultDialog skips fields whose path is absent from the payload — email-only users see no dirty Phone Number row, and (same mechanism) manually-set passwords no longer render an undefined Temporary Password row. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 45f266b commit bc65105

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/platform-objects': minor
3+
---
4+
5+
feat(platform-objects): surface phone number in the create_user result dialog
6+
7+
`sys_user`'s `create_user` action now declares `user.phoneNumber` in its
8+
`resultDialog.fields`, so admins creating phone-based accounts see the
9+
sign-in phone number alongside the email and temporary password. The
10+
create-user response carries `phoneNumber` only for phone-based users;
11+
objectui's ActionResultDialog skips declared fields whose path is absent
12+
from the payload, so email-only users see no extra row.

packages/platform-objects/src/identity/sys-user.object.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ export const SysUser = ObjectSchema.create({
187187
'Copy the temporary password now — it is shown only once and never stored.',
188188
acknowledge: 'I have saved this password',
189189
fields: [
190+
// The dialog skips fields whose path is absent from the response, so
191+
// conditional keys are safe to declare: phoneNumber only exists for
192+
// phone-based users, temporaryPassword only when the server minted one.
190193
{ path: 'user.email', label: 'Email', format: 'text' },
194+
{ path: 'user.phoneNumber', label: 'Phone Number', format: 'text' },
191195
{ path: 'temporaryPassword', label: 'Temporary Password', format: 'secret' },
192196
],
193197
},

0 commit comments

Comments
 (0)