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
Workspace - Download option is shown for auditor but download fails #92325
Version Number: 9.3.91-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:#91305 Email or phone of affected tester (no customers):djoijnsdojsoijnsdoijnsij1@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
User A invites User B to workspace as auditor.
Perform steps below as auditor (User B).
Go to staging.new.expensify.com
Go to workspace settings > Categories.
Click More > Download.
Expected Result:
Download option should be hidden for auditor if download is not allowed.
Actual Result:
Download option is shown for auditor but download fails.
👋 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.
In the Categories page More menu, the Download CSV action is gated only by hasVisibleCategories — unlike Settings and Import spreadsheet, which are gated by canWriteCategories. So an auditor (read-only) still sees Download.
Clicking it fails because downloadCategoriesCSV calls WRITE_COMMANDS.EXPORT_CATEGORIES_CSV — a backend write command that read-only auditors are not permitted to run. That mismatch (visible option + write-only command) is exactly the reported symptom.
PR #91305 (which introduced auditor read-only access) added the canWriteCategories guard to the other secondary actions but missed the Download item.
What changes do you think we should make in order to solve the problem?
Add the canWriteCategories guard to the Download CSV menu item so it is hidden for read-only auditors, consistent with the Settings/Import items on the same page (i.e. gate the block at WorkspaceCategoriesPage.tsx:500 on canWriteCategories && hasVisibleCategories).
Apply the same fix to the Tags page (WorkspaceTagsPage.tsx:589), which has the identical missing guard and will exhibit the same failure for auditors.
What alternative solutions did you explore? (Optional)
If the product intent is that auditors should be able to export read-only data, the alternative is to leave the option visible and instead allow auditors to run EXPORT_CATEGORIES_CSV on the backend. That is a backend permission change outside the App repo and would need an internal engineer — but it contradicts the read-only intent of PR #91305, so hiding the option in App is the simpler, consistent deploy-blocker fix.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92325) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
Activity
applause-bot commentedon Jun 2, 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/6a16560b16bccc6be3ccb7741c6e8aa28341522829a94909f4f46f3c34ca34f8
melvin-bot commentedon Jun 2, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #91305
melvin-bot commentedon Jun 2, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 2, 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:
MelvinBot commentedon Jun 2, 2026
Proposal
What is the root cause of that problem?
In the Categories page More menu, the Download CSV action is gated only by
hasVisibleCategories— unlike Settings and Import spreadsheet, which are gated bycanWriteCategories. So an auditor (read-only) still sees Download.Clicking it fails because
downloadCategoriesCSVcallsWRITE_COMMANDS.EXPORT_CATEGORIES_CSV— a backend write command that read-only auditors are not permitted to run. That mismatch (visible option + write-only command) is exactly the reported symptom.PR #91305 (which introduced auditor read-only access) added the
canWriteCategoriesguard to the other secondary actions but missed the Download item.Code evidence
canWriteCategories):WorkspaceCategoriesPage.tsx:500canWriteCategories:WorkspaceCategoriesPage.tsx:484-499EXPORT_CATEGORIES_CSV:Category.ts:1543-1555hasVisibleTags:WorkspaceTagsPage.tsx:589What changes do you think we should make in order to solve the problem?
Add the
canWriteCategoriesguard to the Download CSV menu item so it is hidden for read-only auditors, consistent with the Settings/Import items on the same page (i.e. gate the block atWorkspaceCategoriesPage.tsx:500oncanWriteCategories && hasVisibleCategories).Apply the same fix to the Tags page (
WorkspaceTagsPage.tsx:589), which has the identical missing guard and will exhibit the same failure for auditors.What alternative solutions did you explore? (Optional)
If the product intent is that auditors should be able to export read-only data, the alternative is to leave the option visible and instead allow auditors to run
EXPORT_CATEGORIES_CSVon the backend. That is a backend permission change outside the App repo and would need an internal engineer — but it contradicts the read-only intent of PR #91305, so hiding the option in App is the simpler, consistent deploy-blocker fix.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92325)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
flodnv commentedon Jun 2, 2026
@ShridharGoel lmk if this needs backend changes
ShridharGoel commentedon Jun 2, 2026
@flodnv Should we change
EXPORT_CATEGORIES_CSVandEXPORT_TAGS_CSVto read commands?m-natarajan commentedon Jun 2, 2026
Chrome / v9.3.91-1
Auditor has no access to Category tab
REC-20260602152244.mp4