From 97d34820b6f43337c380f0a52fbef364fd99eb8b Mon Sep 17 00:00:00 2001 From: OSBotify <76178356+OSBotify@users.noreply.github.com> Date: Fri, 24 Sep 2021 09:27:22 -0700 Subject: [PATCH 1/2] Merge pull request #5497 from Expensify/version-BUILD-c75955fc456619d4caa9f959b29c12abea15bb95 (cherry picked from commit d92ac1fc5eda539f76ef88874b4d5a4e8dc172ee) --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5a4bbf49cd76..c73e088e8f47 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -150,8 +150,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001010201 - versionName "1.1.2-1" + versionCode 1001010203 + versionName "1.1.2-3" } splits { abi { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index fa35218bc254..2378c6a907d1 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -31,7 +31,7 @@ CFBundleVersion - 1.1.2.1 + 1.1.2.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index f154905e7965..0ad3ec143d79 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.1.2.1 + 1.1.2.3 diff --git a/package-lock.json b/package-lock.json index f081777bc197..5315de332375 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.1.2-1", + "version": "1.1.2-3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index af19a2d0c82c..f47af782fd01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.1.2-1", + "version": "1.1.2-3", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From a1f594bb513b8cfc84b1d8647de70c64ec10098a Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Fri, 24 Sep 2021 09:25:14 -0700 Subject: [PATCH 2/2] Merge pull request #5495 from Expensify/revert-5485-ionatan_addbeta_freeplansoftlaunch Revert "Moves all free plan beta checks to use free plan soft launch beta" (cherry picked from commit c75955fc456619d4caa9f959b29c12abea15bb95) --- src/CONST.js | 1 - src/libs/Navigation/AppNavigator/AuthScreens.js | 2 +- src/libs/Navigation/Navigation.js | 2 +- src/libs/Permissions.js | 9 --------- src/pages/LoginWithValidateCode2FAPage.js | 4 ++-- src/pages/LoginWithValidateCodePage.js | 4 ++-- .../ReimbursementAccount/ReimbursementAccountPage.js | 2 +- src/pages/home/sidebar/SidebarScreen.js | 2 +- src/pages/workspace/WorkspaceCardPage.js | 2 +- src/pages/workspace/WorkspaceEditorPage.js | 2 +- src/pages/workspace/WorkspacePeoplePage.js | 2 +- 11 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 13438067fd23..f73743110eb1 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -88,7 +88,6 @@ const CONST = { IOU: 'IOU', PAY_WITH_EXPENSIFY: 'payWithExpensify', FREE_PLAN: 'freePlan', - FREE_PLAN_SOFT_LAUNCH: 'freePlanSoftLaunch', DEFAULT_ROOMS: 'defaultRooms', BETA_EXPENSIFY_WALLET: 'expensifyWallet', INTERNATIONALIZATION: 'internationalization', diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index c879ff794bc7..38c3639ce2ad 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -120,7 +120,7 @@ let hasLoadedPolicies = false; function loadPoliciesBehindBeta(betas) { // When removing the freePlan beta, simply load the policyList and the policySummaries in componentDidMount(). // Policy info loading should not be blocked behind the defaultRooms beta alone. - if (!hasLoadedPolicies && (Permissions.canUseFreePlanSoftLaunch(betas) || Permissions.canUseDefaultRooms(betas))) { + if (!hasLoadedPolicies && (Permissions.canUseFreePlan(betas) || Permissions.canUseDefaultRooms(betas))) { getPolicyList(); getPolicySummaries(); hasLoadedPolicies = true; diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index c4760ad60db6..12279df62d2e 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -200,7 +200,7 @@ function isActiveRoute(routePath) { * * Example: * ```jsx - * if (!Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + * if (!Permissions.canUseFreePlan(this.props.betas)) { * return ; * } * ``` diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 8f654b79b82e..bf1850cb9b8e 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -43,14 +43,6 @@ function canUseFreePlan(betas) { return _.contains(betas, CONST.BETAS.FREE_PLAN) || canUseAllBetas(betas); } -/** - * @param {Array} betas - * @returns {Boolean} - */ -function canUseFreePlanSoftLaunch(betas) { - return _.contains(betas, CONST.BETAS.FREE_PLAN_SOFT_LAUNCH) || canUseAllBetas(betas); -} - /** * @param {Array} betas * @returns {Boolean} @@ -80,7 +72,6 @@ export default { canUseIOU, canUsePayWithExpensify, canUseFreePlan, - canUseFreePlanSoftLaunch, canUseDefaultRooms, canUseInternationalization, canUseWallet, diff --git a/src/pages/LoginWithValidateCode2FAPage.js b/src/pages/LoginWithValidateCode2FAPage.js index d71e663ff55b..5484242544d7 100644 --- a/src/pages/LoginWithValidateCode2FAPage.js +++ b/src/pages/LoginWithValidateCode2FAPage.js @@ -70,7 +70,7 @@ class LoginWithValidateCode2FAPage extends Component { // and by calling dismissModal(), the /v/... route is removed from history so the user will get taken to `/` // if they cancel out of the new workspace modal. Navigation.dismissModal(); - if (Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (Permissions.canUseFreePlan(this.props.betas)) { this.rerouteToRelevantPage(); } } @@ -78,7 +78,7 @@ class LoginWithValidateCode2FAPage extends Component { componentDidUpdate() { // Betas can be loaded a little after a user is authenticated, so check again if the betas have been updated - if (this.props.session.authToken && Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (this.props.session.authToken && Permissions.canUseFreePlan(this.props.betas)) { this.rerouteToRelevantPage(); } } diff --git a/src/pages/LoginWithValidateCodePage.js b/src/pages/LoginWithValidateCodePage.js index a3eb999741dc..c01fcbcc52e2 100644 --- a/src/pages/LoginWithValidateCodePage.js +++ b/src/pages/LoginWithValidateCodePage.js @@ -47,7 +47,7 @@ class LoginWithValidateCodePage extends Component { // and by calling dismissModal(), the /v/... route is removed from history so the user will get taken to `/` // if they cancel out of the new workspace modal. Navigation.dismissModal(); - if (Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (Permissions.canUseFreePlan(this.props.betas)) { this.rerouteToRelevantPage(); } return; @@ -60,7 +60,7 @@ class LoginWithValidateCodePage extends Component { componentDidUpdate() { // Betas can be loaded a little after a user is authenticated, so check again if the betas have been updated - if (this.props.session.authToken && Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (this.props.session.authToken && Permissions.canUseFreePlan(this.props.betas)) { this.rerouteToRelevantPage(); } } diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js index c0c9bc126521..3adffd340a27 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountPage.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountPage.js @@ -138,7 +138,7 @@ class ReimbursementAccountPage extends React.Component { } render() { - if (!Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (!Permissions.canUseFreePlan(this.props.betas)) { console.debug('Not showing new bank account page because user is not on free plan beta'); Navigation.dismissModal(); return null; diff --git a/src/pages/home/sidebar/SidebarScreen.js b/src/pages/home/sidebar/SidebarScreen.js index e93033f6eada..725d30e898c1 100755 --- a/src/pages/home/sidebar/SidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen.js @@ -172,7 +172,7 @@ class SidebarScreen extends Component { onSelected: () => Navigation.navigate(ROUTES.IOU_BILL), }, ] : []), - ...(Permissions.canUseFreePlanSoftLaunch(this.props.betas) && !isAdminOfFreePolicy(this.props.allPolicies) ? [ + ...(Permissions.canUseFreePlan(this.props.betas) && !isAdminOfFreePolicy(this.props.allPolicies) ? [ { icon: NewWorkspace, iconWidth: 46, diff --git a/src/pages/workspace/WorkspaceCardPage.js b/src/pages/workspace/WorkspaceCardPage.js index 269d2f374684..4eee5d7f9535 100644 --- a/src/pages/workspace/WorkspaceCardPage.js +++ b/src/pages/workspace/WorkspaceCardPage.js @@ -109,7 +109,7 @@ const WorkspaceCardPage = ({ } }; - if (!Permissions.canUseFreePlanSoftLaunch(betas)) { + if (!Permissions.canUseFreePlan(betas)) { console.debug('Not showing workspace card page because user is not on free plan beta'); return ; } diff --git a/src/pages/workspace/WorkspaceEditorPage.js b/src/pages/workspace/WorkspaceEditorPage.js index db84595e5134..c5f3f77b1967 100644 --- a/src/pages/workspace/WorkspaceEditorPage.js +++ b/src/pages/workspace/WorkspaceEditorPage.js @@ -85,7 +85,7 @@ class WorkspaceEditorPage extends React.Component { render() { const {policy} = this.props; - if (!Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (!Permissions.canUseFreePlan(this.props.betas)) { console.debug('Not showing workspace editor page because user is not on free plan beta'); return ; } diff --git a/src/pages/workspace/WorkspacePeoplePage.js b/src/pages/workspace/WorkspacePeoplePage.js index c652a1dfd1a4..843ef6be3728 100644 --- a/src/pages/workspace/WorkspacePeoplePage.js +++ b/src/pages/workspace/WorkspacePeoplePage.js @@ -208,7 +208,7 @@ class WorkspacePeoplePage extends React.Component { } render() { - if (!Permissions.canUseFreePlanSoftLaunch(this.props.betas)) { + if (!Permissions.canUseFreePlan(this.props.betas)) { console.debug('Not showing workspace people page because user is not on free plan beta'); return ; }