Repository navigation
Apply approve-only permission checks to missed expense creation paths - #104929
ShridharGoel wants to merge 8 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 618e3ac982
ℹ️ 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".
|
@Pujan92 Did you get the chance to review this? |
…oy-blockers # Conflicts: # src/components/MoneyRequestConfirmationList/sections/ReportField.tsx # src/hooks/useOutstandingReports.ts # src/pages/iou/request/step/IOURequestEditReportCommon.tsx
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@ShridharGoel we need to remove the temp block condition |
|
|
Explanation of Change
The approve-only workspace role lets a member approve reports but not create expenses (#102933). The permission check
canCreateExpensesOnPolicywas applied to the main expense creation flows, but a few older paths still only checked that the member has any role on the workspace. This PR applies the check to those paths:getActivePoliciesWithExpenseChatnow excludes workspaces without the create-expense permission. This also fixes the start page counts that show the Per diem tab and auto-select a single workspace.useOutstandingReportsnow applies the same permission filter as the report list, so the field is disabled when the list would be empty.Fixed Issues
$ #104917
$ #104914
$ #104907
$ #104903
$ #104902
$ #104945
Tests
Setup:
Verify the fixes as User B:
Regression checks:
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection above### Testssection### Offline stepssection### QA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verifiedAvataris 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 the### Testssteps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2026-10-24.at.7.16.30.PM.mov
Screen.Recording.2026-10-24.at.7.36.32.PM.mov
Screen.Recording.2026-10-24.at.7.46.23.PM.mov