Add payments admin workspace access#94018
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
# Conflicts: # src/components/WorkspaceMemberRoleList.tsx # src/languages/de.ts # src/languages/es.ts # src/languages/fr.ts # src/languages/it.ts # src/languages/ja.ts # src/languages/nl.ts # src/languages/pl.ts # src/languages/pt-BR.ts # src/languages/zh-hans.ts # src/pages/workspace/WorkspaceMembersPage.tsx # src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx
|
@Beamanator Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59430afb83
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Kicked off an adhoc build for review. |
|
🚧 JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
JmillsExpensify
left a comment
There was a problem hiding this comment.
Workflows page works really well. Submission and Approvals were locked, Payments weren't, and only the Auto-pay toggle in Advanced was editable.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
|
@ShridharGoel Let's fix the conflicts |
|
@Pujan92 Done |
|
@MelvinBot review |
|
🤖 Reviewed the diff. No blocking bugs — the change faithfully follows the existing
A few non-blocking items worth a look before this ships:
What I verified
|
| const isOwner = policy?.owner === email; | ||
| const isAdmin = policyEmployee.role === CONST.POLICY.ROLE.ADMIN; | ||
| return !isDeletedPolicyEmployee(policyEmployee) && (isOwner || isAdmin); | ||
| const totalNumberOfPayerCandidates = Object.entries(policy?.employeeList ?? {}).filter(([email, policyEmployee]) => { |
There was a problem hiding this comment.
NAB
| const totalNumberOfPayerCandidates = Object.entries(policy?.employeeList ?? {}).filter(([email, policyEmployee]) => { | |
| const payerCandidatesCount = Object.entries(policy?.employeeList ?? {}).filter(([email, policyEmployee]) => { |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 flodnv has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/flodnv in version: 9.4.29-0 🚀
|
|
🤖 I reviewed the changes in this PR against the help site files under Why: This PR introduces a new Payments Admin workspace role (Control workspaces only) that can manage payments in Workflows, be selected as the workspace payer, and has scoped read-only access elsewhere. The canonical role documentation — Draft PR: #95527 What it changes:
Role names, section names, and Control-plan gating were verified against this PR's code ( @ShridharGoel, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #95536 was identified to be related to this PR. |
|
Deploy Blocker #95560 was identified to be related to this PR. |
|
Deploy Blocker #95615 was identified to be related to this PR. |
|
Deploy Blocker #95625 was identified to be related to this PR. |
|
Deploy Blocker #95629 was identified to be related to this PR. |
|
🚀 Deployed to staging by https://github.com/flodnv in version: 9.4.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.31-0 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
This PR adds Payments Admin to the workspace UI and lets that role manage Workflows > Payments.
Payments Admins can now be selected in role pickers, shown in member badges and filters, selected as workspace payer, and access payment setup pages through
WORKFLOWS_PAYMENTSwrite access. Approval and broader workspace settings stay gated by their existing permissions.Fixed Issues
$ #90504
Tests
Offline tests
QA Steps
Same
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari