Skip to content

[Due for payment 2026-06-17] [Due for payment 2026-06-16] Accounting - Offer available! is clickable for auditor which opens not here page #92812

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.4.0-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: #92270
Email or phone of affected tester (no customers): sdsonjodjsodjos@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.
  • Enable Accounting workspace settings > More features.
  • Perform steps below as auditor (User B).
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Accounting.
  3. Click Offer available! next to Xero.

Expected Result:

Offer available! should not be clickable for auditor.

Actual Result:

Offer available! is clickable for auditor which opens not here page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7172885_1780683530512.4.mp4

View all open jobs on GitHub

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 5, 2026
  2. applause-bot commented on Jun 5, 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/0633101c1d468bb9479977781326880ed01e347b1265124ec217005ce5fd68e1

  3. melvin-bot commented on Jun 5, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jun 5, 2026

    @melvin-bot

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

  5. github-actions commented on Jun 5, 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 5, 2026

    @MelvinBot
    Contributor

    Proposal

    Regression from #92270 (read-only auditor access). The fix is fully within Expensify/App.

    What is the root cause of that problem?

    PR #92270 newly let auditors view the Accounting page (read access), but the "Offer available!" Xero badge still navigates everyone to an admin-only page.

    1. The Xero badge's onBadgePress always navigates to the Claim Offer page — it is not gated by canWriteAccounting, unlike the adjacent "Setup" button right below it, which calls showReadOnlyModal() for read-only users:
      PolicyAccountingPage.tsx:362-367 (badge, ungated) vs. :372-394 (Setup button, gated).

    2. The Claim Offer page is gated ADMIN-only — it passes accessVariants={[ADMIN]} but no policyFeature prop: ClaimOfferPage.tsx:138-142. An auditor is not an admin, so the wrapper renders the "not here" Not Found page.

    Why the page loads for auditors but the badge target doesn't — mechanism

    The new read-access mechanism in #92270 lives in AccessOrNotFoundWrapper.tsx:190-201: when a policyFeature prop is supplied, the ADMIN variant is filtered out and access is granted via canMemberRead(...) instead.

    • Accounting page passes policyFeature={POLICY_FEATURE.ACCOUNTING} → PolicyAccountingPage.tsx:668-672 → auditor passes the read check → page is visible.
    • Claim Offer page omits policyFeature and keeps accessVariants={[ADMIN]} → ADMIN check is not filtered out → auditor fails canEditWorkspaceSettings → Not Found page.

    So the badge sends a read-only user to a route their role can't open — the bug is the ungated navigation, not the page guard itself (the Claim Offer / connect flow is intentionally a write action).

    What changes do you think we should make in order to solve the problem?

    Gate the badge press exactly like the adjacent "Setup" button: in onBadgePress at PolicyAccountingPage.tsx:363-367, when !canWriteAccounting, call showReadOnlyModal() and return instead of navigating to the Claim Offer route. This keeps read-only users on the "Not so fast" modal pattern already used everywhere else on this page.

    What alternative solutions did you explore? (Optional)

    Hide the badge entirely for read-only users (set badgeText/onBadgePress to undefined when !canWriteAccounting). This also fixes the crash-to-Not-Found, but it diverges from the page's established read-only pattern (show the control, route writes to the "Not so fast" modal), so gating the press is preferred.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/92812) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.

  7. ShridharGoel commented on Jun 5, 2026

    @ShridharGoel
    Contributor

    Fixed in #92781

    CC: @Pujan92

  8. Julesssss commented on Jun 8, 2026

    @Julesssss
    Contributor

    @flodnv I have handled

  9. m-natarajan commented on Jun 8, 2026

    @m-natarajan

    Chrome / v9.4.0-4
    Passed

    REC-20260608231431.mp4
  10. Julesssss commented on Jun 8, 2026

    @Julesssss
    Contributor

    Thank you!

  11. changed the title [-]Accounting - Offer available! is clickable for auditor which opens not here page[/-] [+][Due for payment 2026-06-16] Accounting - Offer available! is clickable for auditor which opens not here page[/+] on Jun 9, 2026
  12. melvin-bot commented on Jun 9, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-16. 🎊

  13. melvin-bot commented on Jun 9, 2026

    @melvin-bot

    @Julesssss The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  14. changed the title [-][Due for payment 2026-06-16] Accounting - Offer available! is clickable for auditor which opens not here page[/-] [+][Due for payment 2026-06-17] [Due for payment 2026-06-16] Accounting - Offer available! is clickable for auditor which opens not here page[/+] on Jun 10, 2026
  15. melvin-bot commented on Jun 10, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.1-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-06-17. 🎊

  16. melvin-bot commented on Jun 10, 2026

    @melvin-bot

    @Julesssss The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions