MCPcopy Create free account
hub / github.com/bytebase/bytebase / getUserFullNameByType

Function getUserFullNameByType

frontend/src/store/modules/v1/common.ts:34–43  ·  view source on GitHub ↗
(user: User)

Source from the content-addressed store, hash-verified

32export const workloadIdentityNamePrefix = "workloadIdentities/";
33
34export const getUserFullNameByType = (user: User): string => {
35 switch (getAccountTypeByEmail(user.email)) {
36 case AccountType.SERVICE_ACCOUNT:
37 return `${serviceAccountNamePrefix}${user.email}`;
38 case AccountType.WORKLOAD_IDENTITY:
39 return `${workloadIdentityNamePrefix}${user.email}`;
40 default:
41 return `${userNamePrefix}${user.email}`;
42 }
43};
44
45export const getNameParentTokens = (
46 name: string,

Callers 4

handleDeactivateFunction · 0.90
handleRestoreFunction · 0.90
UserFormFunction · 0.90

Calls 1

getAccountTypeByEmailFunction · 0.90

Tested by

no test coverage detected