Skip to content

Commit

Permalink
Merge pull request #3780 from Expensify/amal-default-room-policies-beta
Browse files Browse the repository at this point in the history
Allow those in defaultRooms beta to also load policies
  • Loading branch information
yuwenmemon authored Jun 28, 2021
2 parents 461f670 + 1275f58 commit a1c742c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libs/Navigation/AppNavigator/AuthScreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class AuthScreens extends React.Component {
fetchCountryCodeByRequestIP();
UnreadIndicatorUpdater.listenForReportChanges();

if (Permissions.canUseFreePlan(this.props.betas)) {
if (Permissions.canUseFreePlan(this.props.betas) || Permissions.canUseDefaultRooms(this.props.betas)) {
getPolicySummaries();
getPolicyList();
}
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ function canUseIOU(betas) {
* @returns {Boolean}
*/
function canUsePayWithExpensify(betas) {
return _.contains(betas, CONST.BETAS.PAY_WITH_EXPENSIFY) || canUseAllBetas();
return _.contains(betas, CONST.BETAS.PAY_WITH_EXPENSIFY) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
*/
function canUseFreePlan(betas) {
return _.contains(betas, CONST.BETAS.FREE_PLAN) || canUseAllBetas();
return _.contains(betas, CONST.BETAS.FREE_PLAN) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
*/
function canUseDefaultRooms(betas) {
return _.contains(betas, CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas();
return _.contains(betas, CONST.BETAS.DEFAULT_ROOMS) || canUseAllBetas(betas);
}

export default {
Expand Down

0 comments on commit a1c742c

Please sign in to comment.