Skip to content

Commit

Permalink
Merge pull request Expensify#49646 from Expensify/vit-addSupportalCom…
Browse files Browse the repository at this point in the history
…mands

[NoQA] Add some read commands to the supportal whitelist
  • Loading branch information
mountiny authored Sep 24, 2024
2 parents 05aaf60 + ec18f5e commit 8e10c5f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/libs/Network/NetworkStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,23 @@ function getAuthToken(): string | null | undefined {
}

function isSupportRequest(command: string): boolean {
return [WRITE_COMMANDS.OPEN_APP, SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP, SIDE_EFFECT_REQUEST_COMMANDS.OPEN_REPORT, READ_COMMANDS.SEARCH].some((cmd) => cmd === command);
return [
WRITE_COMMANDS.OPEN_APP,
SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP,
SIDE_EFFECT_REQUEST_COMMANDS.OPEN_REPORT,
READ_COMMANDS.SEARCH,
READ_COMMANDS.OPEN_CARD_DETAILS_PAGE,
READ_COMMANDS.OPEN_POLICY_CATEGORIES_PAGE,
READ_COMMANDS.OPEN_POLICY_COMPANY_CARDS_PAGE,
READ_COMMANDS.OPEN_POLICY_DISTANCE_RATES_PAGE,
READ_COMMANDS.OPEN_POLICY_EXPENSIFY_CARDS_PAGE,
READ_COMMANDS.OPEN_POLICY_MORE_FEATURES_PAGE,
READ_COMMANDS.OPEN_POLICY_PROFILE_PAGE,
READ_COMMANDS.OPEN_POLICY_REPORT_FIELDS_PAGE,
READ_COMMANDS.OPEN_POLICY_TAGS_PAGE,
READ_COMMANDS.OPEN_POLICY_WORKFLOWS_PAGE,
READ_COMMANDS.OPEN_SUBSCRIPTION_PAGE,
].some((cmd) => cmd === command);
}

function isSupportAuthToken(): boolean {
Expand Down

0 comments on commit 8e10c5f

Please sign in to comment.