[$175] Workflows - Missing hint and role not disabled for Authorized Payer
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.4.94-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: https://test-management.browserstack.com/projects/2219752/test-runs/75704622/folder/53678307/48358512/1798307301?sort=%2Bidentifier Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: Windows 10/Chrome App Component: Workspace Settings
Action Performed:
Preconditions Preconditions The user is in a workspace with a connected bank account The workspace has fewer than 8 members with admin role
- Navigate to the workspace from preconditions > Workflows
- Click on the Payer field to open the Authorized Payer RHP
- Set any of the admin as the Payer (Don't select owner) - Click Share
- Go to the Members tab
- Click on the Admin payer member to view the member detail page
- Verify that the role field is disabled and a hint text below it saying: "Role can't be changed because this member is a [payer] on this workspace.
Expected Result:
Verify that the role field is disabled and a hint text below it saying: "Role can't be changed because this member is a [payer] on this workspace.
Actual Result:
Missing hint and role not disabled for Authorized Payer
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/5531be52-7743-47be-a973-0f9a78b21188
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7270566
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022104469819161590429
- Upwork Job ID: 2104469819161590429
- Last Price Increase: 2026-09-28
Issue Owner
Current Issue Owner: @jasperhuangg
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/9fd6c007d5ed6c118d414f783d87cdf2d4b14395c8f6d91e204a6b6911d4d878
Proposal
What is the root cause of that problem?
This is mostly intended behavior, and the test case is out of date. Allow promoting the Authorized Payer to Workspace Admin (merged 2026-08-27) deliberately removed the blanket lock and the "Role can't be changed…" hint. That PR fixed Authorized Payer cannot be promoted to Workspace Admin because the Role field is locked. A later revert, Revert #98123 to resolve Authorized Payer deploy blockers, was closed without merging.
The payer's Role row now stays editable when there is another payer role they can switch to. The role picker then offers only payer roles. As a result, common.roleCannotBeChanged is no longer used anywhere.
There is one real gap. PAYER_ROLES includes Editor, but the role picker never offers Editor. On a Collect workspace, an admin payer's Role row looks editable because of Editor. The picker then shows only "Workspace admin", the role they already have. So the row is a dead end, and the lock hint never shows.
Code references
- WorkspaceMemberDetailsPage.tsx:159-162: the row is editable when
assignablePayerRoleshas a role different from the current one. - WorkspaceMemberDetailsPage.tsx:392-414: the Role row has no
hintText. - PolicyUtils.ts:733-741:
PAYER_ROLESis every role with payments write access, which includes Editor. - WorkspaceMemberRoleList.tsx:47-94: the picker never lists Editor.
- WorkspaceMemberDetailsRolePage.tsx:43-62: the picker limits the payer to
PAYER_ROLESand rejects roles that can't pay. - WorkspaceMemberDetailsPageTest.tsx:277-303: this test currently expects the Collect dead-end row to stay interactive "because Editor also holds the payments permission".
What changes do you think we should make in order to solve the problem?
- Update the regression test case. On a Control workspace, an admin payer can switch between Workspace Admin and Payments Admin, so the Role row should stay enabled with no hint.
- In
WorkspaceMemberDetailsPage, count only the payer roles the picker actually offers when you computecanReimburserChangeRole. In practice, leave out Editor. - When the payer has no other role to switch to, disable the row and show
common.roleCannotBeChangedwith a link to the Workflows payments page. Bring back theuseEnvironmentURL andshouldRenderHintAsHTMLthat #98123 removed. - Change the Collect test above so it expects a disabled row with the hint.
What alternative solutions did you explore? (Optional)
If product wants the old blanket lock back, restore !isReimburser in canEditSelectedMemberRole and the hint. That reverts #98123, which the team already declined.
Open question: I couldn't confirm which roles the backend accepts for the payer, especially Editor. That decides whether Editor should also be removed from PAYER_ROLES.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/102392) to create a draft PR.
To refine: @MelvinBot <your feedback>
To reject: Explain why you are rejecting Melvin's proposal.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)
Job added to Upwork: https://www.upwork.com/jobs/~022104469819161590429
In Workspace Settings > Members, when an Admin is set as the Authorized Payer on a Collect workspace (or any workspace where no other payer role is assignable), the Role field remains interactive instead of being disabled, and the expected hint text "Role can't be changed because this member is a [payer] on this workspace" is completely missing. When tapping on the row, the role selector page opens as a dead end, offering only the role they already hold (Workspace Admin). There are two distinct root causes introduced in PR #98123 (Allow promoting the Authorized Payer to Workspace Admin): The Phantom Role Because However, In Complete Removal of Even when Filter (On Collect policies, Restore the Dynamic Automated Unit Tests:
Update Contributor details:
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~014b4243d3d5732b2e
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
CONST.POLICY.ROLE.EDITOR in PAYER_ROLES:
In src/libs/PolicyUtils.ts (lines 704–711):function canRolePay(role: string | undefined): boolean {
return !!role && ROLE_PERMISSION_BUNDLES[role]?.[CONST.POLICY.POLICY_FEATURE.WORKFLOWS_PAYMENTS] === CONST.POLICY.POLICY_FEATURE_ACCESS.WRITE;
}
const PAYER_ROLES = Object.values(CONST.POLICY.ROLE).filter(canRolePay);
EDITOR_POLICY_FEATURES grants WRITE access to all features except ASSIGN_ELEVATED_ROLES, canRolePay(CONST.POLICY.ROLE.EDITOR) evaluates to true, including editor inside PAYER_ROLES.CONST.POLICY.ROLE.EDITOR is an internal/non-UI role that is never offered in src/components/WorkspaceMemberRoleList.tsx (the UI only renders ADMIN, AUDITOR, CARD_ADMIN, PEOPLE_ADMIN, PAYMENTS_ADMIN, and USER).src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx (lines 160–162):const assignablePayerRoles = PAYER_ROLES.filter((payerRole) => canMemberAssignRole(policy, currentUserLogin, payerRole));
const canReimburserChangeRole = assignablePayerRoles.some((payerRole) => payerRole !== member?.role);
const canEditSelectedMemberRole = !isSelectedMemberOwner && !isSelectedMemberCurrentUser && canManageSelectedMemberRole && (!isReimburser || canReimburserChangeRole);
isControlPolicyOnlyRole('editor') returns false (it is not in CONTROL_POLICY_ONLY_ROLES). Therefore, for an Admin user on a Collect policy, canMemberAssignRole(policy, currentUserLogin, CONST.POLICY.ROLE.EDITOR) returns true.
Consequently, assignablePayerRoles contains ['admin', 'editor']. When checking if an Admin payer can change roles:
canReimburserChangeRole evaluates assignablePayerRoles.some((payerRole) => payerRole !== member?.role), which returns true because 'editor' !== 'admin'!
This causes canEditSelectedMemberRole to evaluate to true on Collect workspaces even though there are no other payer roles actually selectable in the UI.hintText and shouldRenderHintAsHTML from MenuItemWithTopDescription:
In PR #98123, lines 401–402 were unconditionally removed from WorkspaceMemberDetailsPage.tsx:- hintText={isReimburser ? translate('common.roleCannotBeChanged', workspaceWorkflowsPageURL) : undefined}
- shouldRenderHintAsHTML
canEditSelectedMemberRole is false, MenuItemWithTopDescription receives no hintText at all. The translation string common.roleCannotBeChanged ("Role can't be changed because this member is a <link>payer</link> on this workspace.") is never rendered.
What changes do you think we should make in order to solve the problem?
PAYER_ROLES to Only Active Selectable Roles in src/libs/PolicyUtils.ts:
Filter out CONST.POLICY.ROLE.EDITOR from PAYER_ROLES (or define PAYER_ROLES to strictly include roles that are valid for selection in WorkspaceMemberRoleList: ADMIN and PAYMENTS_ADMIN):const PAYER_ROLES = Object.values(CONST.POLICY.ROLE)
.filter((role) => role !== CONST.POLICY.ROLE.EDITOR)
.filter(canRolePay);
payments_admin is filtered out by canMemberAssignRole because it is in CONTROL_POLICY_ONLY_ROLES. Thus, for an Admin payer on Collect, assignablePayerRoles will contain only ['admin'], correctly causing canReimburserChangeRole to be false).hintText in src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx:
useEnvironment:
const {environmentURL} = useEnvironment();
const workspaceWorkflowsPageURL = `${environmentURL}/${ROUTES.WORKSPACE_WORKFLOWS.getRoute(policyID, CONST.TAB.WORKFLOWS.PAYMENTS)}`;
isReimburser && !canReimburserChangeRole), render the explanatory hint with the workflow payments link:
<MenuItemWithTopDescription
disabled={!canEditSelectedMemberRole}
title={translate(`workspace.common.roleName`, member?.role)}
interactive={canEditSelectedMemberRole}
description={translate('common.role')}
shouldShowRightIcon={canEditSelectedMemberRole}
shouldGreyOutWhenDisabled={false}
shouldUseDefaultCursorWhenDisabled
hintText={isReimburser && !canReimburserChangeRole ? translate('common.roleCannotBeChanged', workspaceWorkflowsPageURL) : undefined}
shouldRenderHintAsHTML
pressableTestID="member-role-menu-item"
onPress={() => {
...
}}
/>
tests/ui/WorkspaceMemberDetailsPageTest.tsx and tests/ui/WorkspaceMembersTest.tsx:
common.roleCannotBeChanged hint with the correct URL.Payments Admin, so the role field remains interactive and does not display the hint.
What alternative solutions did you explore? (Optional)
Payments Admin on Control workspaces without needing to unassign them first. Our solution preserves that intended capability while properly fixing the Collect workspace boundary and restoring the disabled hint.EDITOR to CONTROL_POLICY_ONLY_ROLES: Rejected because EDITOR is not a Control-tier role; it is an internal permission bundle that shouldn't leak into payer role eligibility.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~014b4243d3d5732b2e
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
In Workspace Settings > Members, when an Admin is designated as the Authorized Payer on a Collect workspace (or any workspace where no other payer role is assignable), the Role field remains interactive instead of disabled, and the expected hint text "Role can't be changed because this member is a [payer] on this workspace" is completely missing. Tapping on the row navigates to a dead-end role selection page that only offers the role they already hold (Workspace Admin).
What is the root cause of that problem?
There are two root causes introduced in PR #98123 (Allow promoting the Authorized Payer to Workspace Admin):
-
Inclusion of Non-UI Role
CONST.POLICY.ROLE.EDITORinPAYER_ROLES: Insrc/libs/PolicyUtils.ts(lines 704–711):function canRolePay(role: string | undefined): boolean { return !!role && ROLE_PERMISSION_BUNDLES[role]?.[CONST.POLICY.POLICY_FEATURE.WORKFLOWS_PAYMENTS] === CONST.POLICY.POLICY_FEATURE_ACCESS.WRITE; } const PAYER_ROLES = Object.values(CONST.POLICY.ROLE).filter(canRolePay);Because
EDITOR_POLICY_FEATUREShasWRITEaccess toWORKFLOWS_PAYMENTS,canRolePay(CONST.POLICY.ROLE.EDITOR)evaluates totrue, includingeditorinPAYER_ROLES. However,editoris an internal permission bundle that is never offered inWorkspaceMemberRoleList.tsx.In
src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx(lines 160–162):const assignablePayerRoles = PAYER_ROLES.filter((payerRole) => canMemberAssignRole(policy, currentUserLogin, payerRole)); const canReimburserChangeRole = assignablePayerRoles.some((payerRole) => payerRole !== member?.role); const canEditSelectedMemberRole = !isSelectedMemberOwner && !isSelectedMemberCurrentUser && canManageSelectedMemberRole && (!isReimburser || canReimburserChangeRole);For an Admin on a Collect policy,
canMemberAssignRole(policy, currentUserLogin, CONST.POLICY.ROLE.EDITOR)returnstrue(it is not inCONTROL_POLICY_ONLY_ROLES). Thus,assignablePayerRolescontains['admin', 'editor'].canReimburserChangeRoleevaluatesassignablePayerRoles.some((payerRole) => payerRole !== member?.role), which evaluates totruebecause'editor' !== 'admin'! This causescanEditSelectedMemberRoleto evaluate totrueon Collect workspaces even though no other payer roles are actually available. -
Omission of
hintTextandshouldRenderHintAsHTMLfromMenuItemWithTopDescription: In PR #98123, the hint rendering on the role menu item was removed. Even whencanEditSelectedMemberRoleisfalse, the explanatory hint textcommon.roleCannotBeChanged("Role can't be changed because this member is a payer on this workspace.") is never rendered.
What changes do you think we should make in order to solve the problem?
-
In
src/libs/PolicyUtils.ts: Filter outCONST.POLICY.ROLE.EDITORfromPAYER_ROLESso that only user-facing selectable roles are considered:--- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -707,7 +707,9 @@ function canRolePay(role: string | undefined): boolean { return !!role && ROLE_PERMISSION_BUNDLES[role]?.[CONST.POLICY.POLICY_FEATURE.WORKFLOWS_PAYMENTS] === CONST.POLICY.POLICY_FEATURE_ACCESS.WRITE; } -const PAYER_ROLES = Object.values(CONST.POLICY.ROLE).filter(canRolePay); +const PAYER_ROLES = Object.values(CONST.POLICY.ROLE) + .filter((role) => role !== CONST.POLICY.ROLE.EDITOR) + .filter(canRolePay); -
In
src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx:- Re-introduce
useEnvironment:const {environmentURL} = useEnvironment(); const workspaceWorkflowsPageURL = `${environmentURL}/${ROUTES.WORKSPACE_WORKFLOWS.getRoute(policyID, CONST.TAB.WORKFLOWS.PAYMENTS)}`; - Restore the explanatory hint text when the member is an Authorized Payer who cannot change roles:
<MenuItemWithTopDescription disabled={!canEditSelectedMemberRole} title={translate(`workspace.common.roleName`, member?.role)} interactive={canEditSelectedMemberRole} description={translate('common.role')} shouldShowRightIcon={canEditSelectedMemberRole} shouldGreyOutWhenDisabled={false} shouldUseDefaultCursorWhenDisabled hintText={isReimburser && !canReimburserChangeRole ? translate('common.roleCannotBeChanged', workspaceWorkflowsPageURL) : undefined} shouldRenderHintAsHTML pressableTestID="member-role-menu-item" onPress={() => { ... }} />
- Re-introduce
Automated Unit Tests:
In tests/ui/WorkspaceMemberDetailsPageTest.tsx:
- Test 1: On a Collect workspace where an Admin is the Authorized Payer, assert that the role menu item is disabled and renders the
common.roleCannotBeChangedhint text containing the workflow payments URL. - Test 2: On a Control workspace where an Admin is the Authorized Payer, assert that the role menu item remains interactive and does not render the disabled hint text (allowing transition to Payments Admin).
What alternative solutions did you explore? (Optional)
- Reverting PR #98123: Rejected because PR #98123 enables promoting Authorized Payers to
Payments Adminon Control workspaces without requiring unassigning them first. Our targeted fix preserves that capability while correctly handling the Collect workspace boundary.
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0139ed4098bdc50182
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!
Withdrawing my proposal on this issue to comply with Expensify's one-job-at-a-time policy for new contributors. Thanks to the team!
@getusha Still overdue 6 days?! Let's take care of this!
@getusha Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
@getusha 10 days overdue. Is anyone even seeing these? Hello?
@getusha this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
This issue has not been updated in over 14 days. @getusha eroding to Weekly issue.
@getusha this issue is now 4 weeks old, please consider:
- Finding a contributor to fix the bug
- Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
- If you have any questions, don't hesitate to start a discussion in #expensify-open-source
Thanks!
@getusha Huh... This is 4 days overdue. Who can take care of this?
@getusha Eep! 4 days overdue now. Issues have feelings too...
@MelvinBot analyze and propose again since your proposal might be outdated.