Skip to content

Bug: read-only content tables expose enabled bulk Delete #3910

Closed

Description

@yannickmonney

Read-only content tables expose enabled bulk Delete despite hiding row Delete

Candidate: content-bulk-delete-readonly-affordance-20260929 · P3 · one ability-gating omission across content tables.

Verified source: 9ea59724df24d62729a9360f3902d964dab39b3e. Actual components and CASL ability; owned query/mutation fixtures only. No live record mutation.

Reproduction

  1. Render Knowledge, Products or Contacts with the real defineAbilityFor('member') ability and one synthetic record. For Contacts use source manual_import, not a synced source.
  2. Open the row menu: View is present; Edit and Delete are absent.
  3. Select the same row with its checkbox. Delete selected is enabled.
  4. Click it and confirm Delete. The actual table calls its mutation hook with the selected record ID despite the role's knowledgeWrite permission being false.
  5. Repeat using the real editor ability. The single-row menu correctly exposes Edit and Delete, and bulk Delete remains enabled.

Expected: selection and the bulk action use the same role permission as the single-row destructive action; a read-only member should not enter a destructive workflow they lack permission to perform. Preserve bulk actions for permitted roles.

Actual: all three tables unconditionally expose selection and the destructive footer. Each member probe reaches the closed mutation boundary. The intentional refusal produces Couldn't delete some items after the user has already selected and confirmed.

Evidence and scope

content-role-gating.probe.test.tsx includes six passing member/editor cases for these three tables, with the actual tables, configs, row menus, selection, bulk confirmation, useViewedRecord and useListPage. Only data/transport/router and unopened create/detail/edit/delete branches are replaced. Per-case JSON/HTML are role-{products,contacts,knowledge}-{member,editor}.*; The parent independently reran the full UI probe suite; parent-ui.log records the passing checks.

The browser fixture at http://127.0.0.1:3088/roles.html repeats Products with the real table and ability. CUA screenshots/AX show member row menu View only (browser-products-member-row-menu.*), enabled bulk footer (browser-products-member-bulk.*), destructive confirmation (browser-products-member-confirm.*), recorded attempted mutation (browser-products-member-after.*), and editor menu View / Edit / Delete (browser-products-editor-control.*).

This report is a UI affordance finding. Its intentionally closed mutation boundary does not prove a real server refusal, persisted mutation, or authorization bypass. Do not infer backend behavior from this UI fixture.

Root

  • Products: services/platform/app/features/products/components/products-table.tsx:151,168; row gate product-row-actions.tsx:25,64.
  • Knowledge: services/platform/app/features/knowledge-entries/components/knowledge-entries-table.tsx:94,111; row gate knowledge-entry-row-actions.tsx:27,54.
  • Contacts: services/platform/app/features/contacts/components/contact-table.tsx:200,218; row gate contact-row-actions.tsx:34-35,74.

All three pass boolean enableRowSelection, never consult ability in the table, and render BulkDeleteBar unconditionally. The shared DataTable already supports boolean or per-row selection gating. The UI data-table guide requires the service to supply permission-dependent disabled state (services/ui-docs/content/components/data-table.md:68,100). The real member ability has read permissions only (services/platform/lib/permissions/ability.ts:114-123).

Deduplication

Live all-state bulk / read-only / bulk permission searches and local baseline/current snapshots were reviewed.

Count once across the three tables, subject to parent dedup review. Do not count the error toast/retry behavior again here; that is the separate shared bulk recovery root.

Replay uses the same vitest.config.ts and browser server command as bulk-recovery.md.

Activity

  1. yannickmonney commented on Sep 29, 2026

    @yannickmonney
    ContributorAuthor

    Current-main revalidation at b7f8ca02ec249c004652b1ee52e112d9cdfa53ea: the reported defect still reproduces.

    Products, Contacts and Knowledge still hide row Delete for a member while exposing enabled bulk Delete. Member/editor controls with actual tables and ability passed. This remains a UI affordance report only.

    The parent reran the local evidence against an isolated detached current-main checkout with current workspace source. Query/mutation boundaries remain controlled; no real cancellation, deletion, assignment, production test or provider action occurred. The original pinned-source evidence is retained. This revalidation does not add a finding.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions