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

Function isUserIncludedInList

frontend/src/utils/v1/user.ts:9–24  ·  view source on GitHub ↗
(
  identifier: string,
  userList: string[]
)

Source from the content-addressed store, hash-verified

7};
8
9export const isUserIncludedInList = (
10 identifier: string,
11 userList: string[]
12) => {
13 const validId = ensureUserFullName(identifier);
14 for (const name of userList) {
15 if (
16 name === ALL_USERS_USER_EMAIL ||
17 name === `${userNamePrefix}${ALL_USERS_USER_EMAIL}` ||
18 name === validId
19 ) {
20 return true;
21 }
22 }
23 return false;
24};
25
26export const extractEmailPrefix = (email: string, suffix: string): string => {
27 if (email.endsWith(suffix)) {

Callers 1

Calls 1

ensureUserFullNameFunction · 0.85

Tested by

no test coverage detected