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

Function isValidUserName

frontend/src/types/v1/user.ts:93–100  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

91};
92
93export const isValidUserName = (name: string) => {
94 return (
95 !!name &&
96 /^users\/(.+)$/.test(name) &&
97 name !== unknownUser().name &&
98 name !== allUsersUser().name
99 );
100};
101
102export const getAccountTypeByFullname = (fullname: string): AccountType => {
103 if (fullname.startsWith(serviceAccountNamePrefix)) {

Callers 2

createUserSliceFunction · 0.90
ProfilePageFunction · 0.90

Calls 2

unknownUserFunction · 0.85
allUsersUserFunction · 0.85

Tested by

no test coverage detected