Skip to content

Company card assign button disabled on shared (non-preferred) workspaces #89672

@MelvinBot

Description

@MelvinBot

Description

When a company card feed is shared to a non-preferred workspace via linkedPolicyIDs, the "Assign card" button is greyed out (disabled) even though the admin should be able to assign cards on that workspace.

Root cause: useIsAllowedToIssueCompanyCard.ts checks if selectedFeedData.domainID === policy.workspaceAccountID to decide whether policy admin status is sufficient. For shared feeds, the domainID belongs to the owning workspace, not the current one — so the check fails and falls through to a domain admin check, which also fails for users who are only workspace admins.

Expected: Policy admins on any workspace that has the feed via linkedPolicyIDs should be able to assign cards.

Actual: Assign button is disabled on non-preferred workspaces because the permission check doesn't account for linkedPolicyIDs.

Related internal issue: https://github.com/Expensify/Expensify/issues/631473

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions