Skip to content

Workspace - Download option is shown for auditor but download fails #92325

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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).
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Categories.
  3. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7169329_1780383941289.3.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7169329

Activity

  1. added
    DeployBlockerCash
    Bug
    on Jun 2, 2026
  2. applause-bot commented on Jun 2, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Jun 2, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #91305

  4. melvin-bot commented on Jun 2, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 2, 2026

    @MelvinBot
    Contributor

    Proposal

    Posted by 🤖 MelvinBot — confidence: High

    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 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.

    Code evidence

    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.

  7. added
    Reviewing
    on Jun 2, 2026
  8. flodnv commented on Jun 2, 2026

    @flodnv
    Contributor

    @ShridharGoel lmk if this needs backend changes

  9. ShridharGoel commented on Jun 2, 2026

    @ShridharGoel
    Contributor

    @flodnv Should we change EXPORT_CATEGORIES_CSV and EXPORT_TAGS_CSV to read commands?

  10. m-natarajan commented on Jun 2, 2026

    @m-natarajan

    Chrome / v9.3.91-1
    Auditor has no access to Category tab

    REC-20260602152244.mp4
  11. self-assigned this
    on Jun 2, 2026
  12. removed
    DeployBlockerCash
    on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugEngineeringHourlyReviewing

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions