Skip to content

Commit

Permalink
Add some read commands to the supportal whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny committed Sep 24, 2024
1 parent 21ebe53 commit ec18f5e
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 ec18f5e

Please sign in to comment.