Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ function canUseCustomRules(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.CUSTOM_RULES) || canUseAllBetas(betas);
}

/**
* The feature is released so hardcoding the value to true while we clean up the beta from the code.
*/
function canUseTableReportView(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.TABLE_REPORT_VIEW) || canUseAllBetas(betas);
return true || !!betas?.includes(CONST.BETAS.TABLE_REPORT_VIEW) || canUseAllBetas(betas);
Comment thread
mountiny marked this conversation as resolved.
}

function canUseTalkToAISales(betas: OnyxEntry<Beta[]>): boolean {
Expand Down
37 changes: 0 additions & 37 deletions tests/actions/IOUTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1589,26 +1589,6 @@ describe('actions/IOU', () => {
});
expect(notifyNewAction).toHaveBeenCalledTimes(1);
});

it('trigger notifyNewAction when doing the money request without canUseTableReportView permission', () => {
requestMoney({
report: {reportID: '123', type: CONST.REPORT.TYPE.EXPENSE},
participantParams: {
payeeEmail: RORY_EMAIL,
payeeAccountID: RORY_ACCOUNT_ID,
participant: {login: CARLOS_EMAIL, accountID: CARLOS_ACCOUNT_ID},
},
transactionParams: {
amount: 1,
attendees: [],
currency: CONST.CURRENCY.USD,
created: '',
merchant: '',
comment: '',
},
});
expect(notifyNewAction).toHaveBeenCalledTimes(1);
});
});

describe('createDistanceRequest', () => {
Expand Down Expand Up @@ -1647,23 +1627,6 @@ describe('actions/IOU', () => {
});
expect(notifyNewAction).toHaveBeenCalledTimes(1);
});

it('trigger notifyNewAction when doing the money request without canUseTableReportView permission', () => {
createDistanceRequest({
report: {reportID: '123', type: CONST.REPORT.TYPE.EXPENSE},
participants: [],
transactionParams: {
amount: 1,
attendees: [],
currency: CONST.CURRENCY.USD,
created: '',
merchant: '',
comment: '',
validWaypoints: {},
},
});
expect(notifyNewAction).toHaveBeenCalledTimes(1);
});
});

describe('split expense', () => {
Expand Down