Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.2.82-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #76792
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: MacBook Air 15.6.1 Chrome
App Component: User Settings
Action Performed:
- Sign in to ND as User A and User B in different tabs or devices
- User A, add User B as a Limited Copilot
- User B, navigate to Profile and switch the account to User A's
- User B, open Security page, click 3 dot menu next to copilot
- Click "Change access level" and "Remove copilot" - "Not so fast" modal appears
- User A, change copilot access for User B to Full
- User B - note that the account was automatically switched to the original (copilot mode was exited)
- User B, enter a copilot mode again and repeat steps 4-5
Expected Result:
Step 7 - User does not exit copilot mode automatically when the access level was changed
Step 8 - Full copilot is able to change their access level or the "Not so fast" modal is the same as for Limited Copilot
Step 8 - Full copilot is not able to remove their own copilot
Actual Result:
Step 7 - User exits copilot mode automatically when the access level was changed (Web)
Step 8 - Full copilot is not able to change their access level. "Not so fast. As a copilot, you don't have access to this page. Sorry!" RHP is displayed (Web and iOS)
Step 8 - Full copilot can remove their own copilot (Web and iOS)
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
1.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022002016522358316810
- Upwork Job ID: 2002016522358316810
- Last Price Increase: 2025-12-19
- Automatic offers:
- ChavdaSachin | Contributor | 109902171
Issue Owner
Current Issue Owner: @laurenreidexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Dec 19, 2025
Triggered auto assignment to @sakluger (
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.[-]Full copilot does not have access to change level, but can remove themself[/-][+] Security - Full copilot does not have access to change level, but can remove themself[/+]daledah commentedon Dec 19, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Step 7 - User exits copilot mode automatically when the access level was changed (Web)
Step 8 - Full copilot is not able to change their access level. "Not so fast. As a copilot, you don't have access to this page. Sorry!" RHP is displayed (Web and iOS)
Step 8 - Full copilot can remove their own copilot (Web and iOS)
What is the root cause of that problem?
We don't check the delegates can remove themselves here
App/src/pages/settings/Security/SecuritySettingsPage.tsx
Lines 319 to 338 in a2313d1
What changes do you think we should make in order to solve the problem?
We should add the logic to prevent delegates from removing themselves
App/src/pages/settings/Security/SecuritySettingsPage.tsx
Lines 319 to 338 in a2313d1
Note: we should do the same with other place that use the same logic
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ChavdaSachin commentedon Dec 19, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Full access delegates can remove their self from delegates.
What is the root cause of that problem?
This PR a while back made changes to allow certain actions to full access delegates over limited access delegates.
Which includes changes
Allow clicking
Change access levelApp/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 305 in a2313d1
Allow clicking
Remove copilotApp/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 323 in a2313d1
And allow clicking
Add copilotApp/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 406 in a2313d1
But PR did miss to fully refine the logic - ie.
Change access levelcould be clicked by full access delegates butUpdateDelegateRolePageis not accessible by even full access delegate resulting in unfinished flow .Also similarly
Add copilotcould be clicked butAddDelegatePageis not accessible by delegates.And fully allowed
Remove copilotflow.What changes do you think we should make in order to solve the problem?
First we need to clear the expectations here.
Either allow full access delegates to access and complete all three
Change access level,Remove copilotandAdd copilotflow.replace
isDelegateAccessRestrictedwithisActingAsDelegateat following three placeApp/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 305 in a2313d1
App/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 323 in a2313d1
App/src/pages/settings/Security/SecuritySettingsPage.tsx
Line 406 in a2313d1
then replace
CONST.DELEGATE.DENIED_ACCESS_VARIANTS.DELEGATEwithCONST.DELEGATE.DENIED_ACCESS_VARIANTS.SUBMITTERto following pagesApp/src/pages/settings/Security/AddDelegate/UpdateDelegateRole/UpdateDelegateRolePage.tsx
Line 64 in a2313d1
App/src/pages/settings/Security/AddDelegate/AddDelegatePage.tsx
Line 105 in a2313d1
App/src/pages/settings/Security/AddDelegate/ConfirmDelegatePage.tsx
Line 60 in a2313d1
App/src/pages/settings/Security/AddDelegate/SelectDelegateRolePage.tsx
Line 57 in a2313d1
Any small missing case could be handled in PR phase.
Note: I haven't checked if BE fully supports for the second expectations, in that case we could need BE changes as well.
What alternative solutions did you explore? (Optional)
If we decide to allow access the add delegate flow to full access delegates, in that case we could optionally limit them to adding only limited access delegates.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-] Security - Full copilot does not have access to change level, but can remove themself[/-][+][$250] Security - Full copilot does not have access to change level, but can remove themself[/+]melvin-bot commentedon Dec 19, 2025
Job added to Upwork: https://www.upwork.com/jobs/~022002016522358316810
melvin-bot commentedon Dec 19, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)76 remaining items
suneox commentedon Mar 16, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Based on the current PR scope, we couldn’t identify an offending PR since the logic has been mismatched with OldDot for a long time.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: [$250] Security - Full copilot does not have access to change level, but can remove themself #78105 (comment)
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Precondition:
Have an account with copiloted access.
Test 1
Test 2
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-0947-a429-58b2-8ecc66d13294suneox commentedon Mar 16, 2026
@laurenreidexpensify The current PR was deployed to production two weeks ago, so this issue is ready for payment.
melvin-bot commentedon Mar 18, 2026
This issue has not been updated in over 15 days. @suneox, @mollfpr, @laurenreidexpensify, @ChavdaSachin eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
melvin-bot commentedon Mar 19, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Mar 19, 2026
Payment Summary
Contributor: @ChavdaSachin paid $250 via Upwork
Contributor+: @suneox due $250 via NewDot
^ Test case created
Thx!
trjExpensify commentedon Mar 20, 2026
approved $250 for @suneox