MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / adminUserTitle

Function adminUserTitle

packages/react/src/lib/admin-users-display.ts:125–132  ·  view source on GitHub ↗
(user: AdminUserIdentityRow)

Source from the content-addressed store, hash-verified

123}
124
125export 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

Callers 3

UserIdentityCellFunction · 0.90
UserDetailTitleFunction · 0.90

Calls 1

isLocalSubjectFunction · 0.85

Tested by

no test coverage detected