(user: AdminUserIdentityRow)
| 123 | } |
| 124 | |
| 125 | export const adminUserTitle = (user: AdminUserIdentityRow): AdminUserTitle => { |
| 126 | const email = user.email?.trim(); |
| 127 | const displayName = user.displayName?.trim(); |
| 128 | const idLabel = isLocalSubject(user.externalId) ? LOCAL_SUBJECT_ID : user.externalId; |
| 129 | const named = email || displayName; |
| 130 | if (!named) return { primary: idLabel, secondary: null, primaryIsId: true }; |
| 131 | return { primary: named, secondary: idLabel, primaryIsId: false }; |
| 132 | }; |
| 133 | |
| 134 | /** The email an operator can copy off a row, or `null` when the host resolved |
| 135 | * none. Deliberately NOT the display name: a name is not an address, and a |
no test coverage detected