---
id: TST-PFM-MTD-069
title: portal ownership predicates
kind: integration
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - >-
    modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js
implements:
  - ATS-PFM-MTD-011-06
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    the owner the boat it owns now, and neither an ended ownership nor an archived boat
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    another contact only the boat it owns through owner
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    a member with no linked contact nothing through owner
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    the published boats through published
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    a crew member the boat it crews through associated
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    nothing through associated for a type the member has no association of
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    a billing contact of o1 the boat o1 owns through owner_organization
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    nothing through owner_organization to a member whose role there has ended
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    nothing through owner_organization for a role the member does not hold
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    every unarchived boat through eligible when the member is eligible
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    nothing through eligible when the member is not
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    the union of an operation’s rules
  - >-
    services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
    nothing in another tenant, whose c1 owns nothing there
fixture_imports:
  - drizzle-orm
  - '@rhythmsoftware/macroservice-testing/stage'
  - ../../../../../../db/seeds/well-known/well-known-objects
  - ../../../../../associations/db/associations.table
  - ../../../../db/custom-object-records.table
  - ../../../../services/persistence/portal-ownership-predicates
  - ../../support
test_doubles:
  - Supplied member eligibility binding decisions
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-011-06
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
        the owner the boat it owns now, and neither an ended ownership nor an archived boat
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
        a member with no linked contact nothing through owner
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
        nothing through owner_organization to a member whose role there has ended
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
        the union of an operation’s rules
      - >-
        services-platform:modules/custom-objects/tests/integration/services/persistence/portal-ownership-predicates.integration.spec.js#grants
        nothing in another tenant, whose c1 owns nothing there
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Portal ownership predicates

## Verification Boundary

This integration suite checks custom objects and records within the local test harness. The registered file and pinned revision define its boundary.

## What This Suite Proves

The bindings identify the detailed or feature scenarios whose outcomes have assertions in this suite. Original case references remain attached to the detailed scenarios so a reviewer can inspect the exact assertion. Assertions are evidence of implemented checks; no execution result is claimed.

## What It Does Not Prove

The register does not establish a current passing run or full specification conformance. Behavior outside the suite’s fixtures and assertions remains unverified.

## Real Dependencies and Test Doubles

The fixture uses PostgreSQL and the imported persistence or API code. Eligibility decisions enter as fixture-supplied binding sets; PostgreSQL evaluates the real audience predicates and workspace policies.

## Must Not Be Doubled

The operation under examination and its asserted stored outcomes must remain real within the declared harness. A fixture cannot replace the write, refusal or transactional effect that the bound scenario checks.
