Skip to content

Commit

Permalink
Add CombinedCreateExpense beta to permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
grgia committed Aug 23, 2024
1 parent 19ca2bb commit 7d343b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ const CONST = {
WORKSPACE_FEEDS: 'workspaceFeeds',
NETSUITE_USA_TAX: 'netsuiteUsaTax',
WORKSPACE_RULES: 'workspaceRules',
COMBINED_CREATE_EXPENSE: 'combinedCreateExpense',
},
BUTTON_STATES: {
DEFAULT: 'default',
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ function canUseWorkspaceRules(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.WORKSPACE_RULES) || canUseAllBetas(betas);
}

function canUseCombinedCreateExpense(betas: OnyxEntry<Beta[]>): boolean {
// We don't need to show this to all betas.
return !!betas?.includes(CONST.BETAS.COMBINED_CREATE_EXPENSE);
}

/**
* Link previews are temporarily disabled.
*/
Expand All @@ -57,4 +62,5 @@ export default {
canUseWorkspaceFeeds,
canUseNetSuiteUSATax,
canUseWorkspaceRules,
canUseCombinedCreateExpense,
};

0 comments on commit 7d343b2

Please sign in to comment.