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
Expense -"Approve Only" member can submit expense if role is changed after expense creation #104948
Version Number: 9.5.20-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#102933 Email or phone of affected tester (no customers):ibellicotest+3295@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: User A is owner of a "Control" workspace with delayed submissions and approvals enabled.
Prerequisite 2: User B already has a "Default" workspace.
Open the staging.new.expensify.com website.
Navigate to "Workspaces" > Workspace > "Members"
Invite User B as "Member" of workspace.
As User B, navigate to workspace chat.
Create a manual expense.
As User A, edit User B role to "Approve-Only"
As User B, note that "Submit" is still available for the created expense.
Click on "Submit"
Note that expense can be submitted.
Expected Result:
"Approve-only" member shouldn´t be able to submit an expense in workspace chat.
Actual Result:
"Approve-Only" member is able to submit an expense, if role is changed from "Member" to "Approve-Only" after expense creation.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Root cause: The PR blocks approve-only members from creating expenses, but it doesn't change any of the checks that decide whether to show Submit. Those checks only ask whether the user owns the report, whether it's open, and whether it has expenses. They never check the user's current role. So after the role change, User B still owns the open draft and still sees Submit. Stale data isn't the cause: with an up-to-date role, the checks still return true.
Recommendation: Fix forward or demote. Don't revert.
Revert is costly. The PR touches about 50 files, including translations in 11 languages.
The role isn't behind a beta, but it isn't in production yet. The bug only happens when an admin downgrades a member who has an open draft.
The fix is small. Add a canCreateExpensesOnPolicy check (or a dedicated "can submit" permission) for the submitter in the five submit checks listed below, and add unit tests for each.
Product needs to decide whether an approve-only member should be able to submit a draft they created before the role change. The server also accepted the submit. With delayed submissions on, scheduled auto-submit will likely submit the draft anyway, so hiding the button in App alone may not fully solve this.
Demote this if product decides that submitting existing drafts is acceptable for now.
Investigation details
What the PR added. The approve-only role has only Overview and Members read access, with no CREATE_EXPENSES permission:
The PR uses this check only in create paths, such as canAddTransaction, canRequestMoney, canCreateReportOnPolicy, the workspace chat "+" menu, and the workspace pickers.
Activity
applause-bot commentedon Oct 26, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/35052ecbea68e617b2d4a85adf3271180d1402e8a8d73b29058714350b900a05
melvin-bot commentedon Oct 26, 2026
@flodnv recently merged #102933, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon Oct 26, 2026
Triggered auto assignment to @NikkiWines (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Oct 26, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Oct 26, 2026
@flodnv @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102933
melvin-bot commentedon Oct 26, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102933
melvin-bot commentedon Oct 26, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 26, 2026
Deploy Blocker Analysis
Causing PR: [Payment due @Pujan92] Add approve-only workspace role (high confidence). This is a gap in the new feature, not a regression in existing behavior.
Root cause: The PR blocks approve-only members from creating expenses, but it doesn't change any of the checks that decide whether to show Submit. Those checks only ask whether the user owns the report, whether it's open, and whether it has expenses. They never check the user's current role. So after the role change, User B still owns the open draft and still sees Submit. Stale data isn't the cause: with an up-to-date role, the checks still return true.
Recommendation: Fix forward or demote. Don't revert.
canCreateExpensesOnPolicycheck (or a dedicated "can submit" permission) for the submitter in the five submit checks listed below, and add unit tests for each.Investigation details
What the PR added. The approve-only role has only Overview and Members read access, with no
CREATE_EXPENSESpermission:src/libs/PolicyUtils/permissions.ts:106-109canRoleCreateExpenses/canCreateExpensesOnPolicyatpermissions.ts:321-327The PR uses this check only in create paths, such as
canAddTransaction,canRequestMoney,canCreateReportOnPolicy, the workspace chat "+" menu, and the workspace pickers.The submit checks that ignore the role:
canSubmitinReportPreviewActionUtils.ts:83isSubmitActioninReportPrimaryActionUtils.ts:169-170isSubmitActioninReportSecondaryActionUtils.ts:278canSubmitReportinReportUtils.ts:3460isSubmitActionAllowedForSearchinSearchUIUtils.ts:2313-2323Beta check. No approve-only beta exists in
CONST.BETAS. Any admin of a Control workspace can assign the role (WorkspaceMemberRoleList.tsx).Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.NikkiWines commentedon Oct 26, 2026
looks like this is being patched by #104952
m-natarajan commentedon Oct 26, 2026
Feature reverted, Not repro ("Approve-only" role option is no longer available in Workspace Settings > Members.)
Mac 26.6/ Chrome, Version: 9.5.20-5
Grabando.177.1.mp4
melvin-bot commentedon Oct 29, 2026
@ShridharGoel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Nov 2, 2026
@ShridharGoel Still overdue 6 days?! Let's take care of this!
melvin-bot commentedon Nov 3, 2026
@ShridharGoel 6 days overdue. This is scarier than being forced to listen to Vogon poetry!