Skip to content

[Workspace Roles] Release 2: Card Admin — Expensify Card page guards and write controls #90500

Closed

Description

@flodnv

Part of the Workspace Roles project. Depends on Release 0 frontend and Release 2 Auth C++ backend.

Goal: Migrate all Expensify Card workspace pages from hardcoded isAdmin checks to hasPolicyPermission(..., FEATURE.EXPENSIFY_CARD, FEATURE_ACCESS.WRITE), giving Card Admins full write access to these pages.

Pages to update

All files under src/pages/workspace/expensifyCard/:

  • WorkspaceExpensifyCardPage.tsx — page entry guard + "Issue card" / "Assign card" CTAs
  • WorkspaceExpensifyCardDetailsPage.tsx — edit controls
  • WorkspaceExpensifyCardSettingsPage.tsx — settings save button
  • WorkspaceExpensifyCardListPage.tsx — action buttons
  • Any additional sub-pages that currently call isPolicyAdmin or check policy.role === 'admin'

Pattern to apply

// Before
if (!isPolicyAdmin(policy, currentUserLogin)) return null;

// After
if (!hasPolicyPermission(policy, currentUserLogin, CONST.POLICY.FEATURE.EXPENSIFY_CARD, CONST.POLICY.FEATURE_ACCESS.WRITE)) return null;

Also update read-only views: if user has FEATURE_ACCESS.READ (Auditor), show the page but disable write controls (consistent with F-2).

Issue OwnerCurrent Issue Owner: @ShridharGoel

Activity

  1. melvin-bot commented on May 13, 2026

    @melvin-bot

    Triggered auto assignment to Design team member for new feature review - @dannymcclain (NewFeature)

  2. nlemma commented on Jun 12, 2026

    @nlemma

    Deploy Blocker #93500 was identified to be related to the PR #92740 that attempted to fix this issue.

  3. mitarachim commented on Jun 13, 2026

    @mitarachim

    Deploy Blocker #93501 was identified to be related to the PR #92740 that attempted to fix this issue.

  4. mitarachim commented on Jun 13, 2026

    @mitarachim

    Deploy Blocker #93506 was identified to be related to the PR #92740 that attempted to fix this issue.

  5. mitarachim commented on Jun 13, 2026

    @mitarachim

    Deploy Blocker #93508 was identified to be related to the PR #92740 that attempted to fix this issue.

  6. mitarachim commented on Jun 13, 2026

    @mitarachim

    Deploy Blocker #93509 was identified to be related to the PR #92740 that attempted to fix this issue.

  7. flodnv commented on Jun 17, 2026

    @flodnv
    ContributorAuthor

    I think this is done

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

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions