Skip to content

Commit

Permalink
whitelist the new config key
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Feb 20, 2025
1 parent e4c5e52 commit 5d05b6f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ async function handler(
});
}

// We only allow setting and retrieving `botEnabled` (slack) and `codeSyncEnabled` (github). This
// is mainly to prevent users from enabling other configs that are not released (e.g. google_drive
// `pdfEnabled`).
// We only allow setting and retrieving `botEnabled` (Slack), `codeSyncEnabled` (GitHub),
// `intercomConversationsNotesSyncEnabled` (Intercom) and `zendeskSyncUnresolvedTicketsEnabled` (Zendesk).
// This is mainly to prevent users from enabling other configs that are not released (e.g., google_drive `pdfEnabled`).
if (
![
"botEnabled",
"codeSyncEnabled",
"intercomConversationsNotesSyncEnabled",
"zendeskSyncUnresolvedTicketsEnabled",
].includes(configKey)
) {
return apiError(req, res, {
Expand Down

0 comments on commit 5d05b6f

Please sign in to comment.