Repository navigation
Gate moving and creating reports for approve-only members - #104905
ShridharGoel wants to merge 15 commits into
Conversation
Route to upgrade flow when user has no workspace to move expenses into.
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.
|
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: da4f6252fa
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0937397eaa
ℹ️ 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".
|
Failing test is unrelated |
…t-upgrade-bulk-move
trjExpensify
left a comment
There was a problem hiding this comment.
Makes sense to me. 👍 CC: @JmillsExpensify for vis.
|
Thanks, agreed we discussed in DM |
|
@ShridharGoel at the moment Draft report seems to be submitted by approve-only member, could you check and prevent the submission |
|
Ah, it will be handled in #104973 |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-10-27.at.11.10.01.movScreen.Recording.2026-10-27.at.11.12.09.mov |
Explanation of Change
Members with the
approveOnlyrole cannot create expenses or reports on that workspace. If they have no other workspace where reports can be created, they have no eligible destination reports and cannot create a new report.This PR:
canEditFieldOfMoneyRequestinReportUtilsto check whether reports can be created on any eligible group workspace (getGroupPoliciesWhereReportCanBeCreated), and filters out policies wherecanCreateExpensesOnPolicyis false when counting candidate destination reports.createReportinDynamicIOURequestEditReportso the option is hidden when there is no eligible workspace to create a report in.Fixed Issues
$ #104897
PROPOSAL:
Tests
Precondition:
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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
MacOS: Chrome / Safari