You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Copilot is able to upgrade / downgrade workspace plan from collect to control and vice versa of another user #64536
Version Number: 9.1.69-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by:@allgandalf Slack conversation (hyperlinked to channel name): #expensify_bugs
Click account > Switch accounts > Subscription > scroll down to reach Your Plans > Explore All plans
Click on Upgrade to Control / Downgrade to collect
Expected Result:
We shown a blocking modal if a co-pilot tries to add payment card / switch between pay-per-use and annual subscription, so blocking modal should be seen while upgrading / downgrading a subscription plan of another user
Actual Result:
The copilot is able to downgrade / upgrade subscription plan of another user
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
You are on collect plan , you’ll be billed $5, your copilot upgrades your plan to control, now you’re billed $18 per month, so yeah most probably a bug
Also, we block the copilot from updating the contract from pay per use -> annual, so it makes sense to block this action as well
Hm, yeah I thought we really only limited adding or removing copilots for full access copilots.
It's interesting though that we show that blocking modal if you try to change from PPU > annual as a copilot or add a billing card. I don't see those mentioned in the design doc, though I did not work on this project. I am curious what @dylanexpensify and @dangrous think about the expected behavior here.
Okay so it looks like we added copilot restrictions to a bunch of flows last December - #50796 - maybe due to some fraud stuff? My guess is then that we'd also want to restrict this flow. But cc @Julesssss since seems like you were in charge of those updates?
i agree this is a 'dangerous' action. I'll raise this internally to see if it's worth blocking or whether there is a valid reason for a co-pilot to take this action on your behalf.
@Julesssss then what about other subscription related options like switching to pay-per-use or disabling auto renew .....
Those actions looks similar to the upgrade or downgrade plan.
So I believe those actions should not be blocked if plan upgrade or downgrade is allowed.
Activity
melvin-bot commentedon Jun 19, 2025
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.izarutskaya commentedon Jun 19, 2025
From @allgandalf
Proposal
Please re-state the problem that we are trying to solve in this issue.
Copilot is able to upgrade / downgrade workspace plan from collect to control and vice versa
What is the root cause of that problem?
We do not block the upgrade / downgrade button if the user is acting as a co-pilot so the action doesn't get blocked
App/src/pages/settings/Subscription/SubscriptionPlan/SubscriptionPlanCardActionButton.tsx
Lines 47 to 50 in 3d818ef
What changes do you think we should make in order to solve the problem?
To fix this issue, we need to add a blocking modal to the page whenever the user is acting as a delegate and pressed the upgrade / downgrade button:
Note
After #64020, we will be using context provider here instead of the above, so during PR, we will use context similarly like we have used in #64020
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A, this is a UI bug but we can always have UI test to see if the values are shown correctly, but this is not required for this case
What alternative solutions did you explore? (Optional)
N/A
rushatgabhane commentedon Jun 19, 2025
i don't see why this is a bug. it's also allowed by backend
please create a feature request instead of a bug.
this change should require a problem solution statement
and ideally we list down all actions we wanna block
cc @dangrous @joekaufmanexpensify
allgandalf commentedon Jun 19, 2025
You are on collect plan , you’ll be billed $5, your copilot upgrades your plan to control, now you’re billed $18 per month, so yeah most probably a bug
Also, we block the copilot from updating the contract from pay per use -> annual, so it makes sense to block this action as well
rushatgabhane commentedon Jun 19, 2025
a copilot has full access to your account so they should be able to do these actions
which is why a problem solution statement should be posted on slack for this. this is not a bug
joekaufmanexpensify commentedon Jun 19, 2025
Hm, yeah I thought we really only limited adding or removing copilots for full access copilots.
It's interesting though that we show that blocking modal if you try to change from PPU > annual as a copilot or add a billing card. I don't see those mentioned in the design doc, though I did not work on this project. I am curious what @dylanexpensify and @dangrous think about the expected behavior here.
dangrous commentedon Jun 20, 2025
Okay so it looks like we added copilot restrictions to a bunch of flows last December - #50796 - maybe due to some fraud stuff? My guess is then that we'd also want to restrict this flow. But cc @Julesssss since seems like you were in charge of those updates?
allgandalf commentedon Jun 20, 2025
@Julesssss I already have a proposal here, can you please check, else i can be the C+ as well
Julesssss commentedon Jun 20, 2025
i agree this is a 'dangerous' action. I'll raise this internally to see if it's worth blocking or whether there is a valid reason for a co-pilot to take this action on your behalf.
ChavdaSachin commentedon Jun 20, 2025
Yes @Julesssss I can work on this, just need the final expected behaviour.
Julesssss commentedon Jun 21, 2025
Actually we believe this t be expected behaviour. Closing this issue
ChavdaSachin commentedon Jun 21, 2025
@Julesssss then what about other subscription related options like switching to
pay-per-useor disablingauto renew.....Those actions looks similar to the upgrade or downgrade plan.
So I believe those actions should not be blocked if plan upgrade or downgrade is allowed.
Screen.Recording.2025-06-21.at.5.45.07.AM.mov
Julesssss commentedon Jun 21, 2025
I think these are similar, and we will let copilots perform this action on your behalf.
ChavdaSachin commentedon Jun 21, 2025
Then I could take it along with @allgandalf .
I will prepare a summary of changes first.
Julesssss commentedon Jun 23, 2025
I mean that we don't need to make any changes here.