---
id: TST-PFM-MTD-075
title: portal access rules
kind: unit
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/custom-objects/tests/unit/portal-access-rules.spec.ts
implements:
  - ATS-PFM-MTD-009-07
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - 'services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts'
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#accepts every rule with
    its own properties, and answers the document as it was given
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#accepts an empty document,
    which grants a portal member nothing
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses an operation that
    is not one of the four
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses a rule that is not
    one of the five, naming where it is
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses owner_organization
    without the CRM roles that qualify
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses a property the
    rule does not carry
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses a rule listed
    twice for one operation
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#accepts owner and
    published on a publishable object with an owner type
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses published on an
    object that is not publishable
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses owner on an object
    without an owner type
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses owner_organization
    on an object without an owner type
  - >-
    services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#names every association
    type the rules name, once each
fixture_imports:
  - chai
  - ../../services/persistence/portal-access-rules
test_doubles: []
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-009-07
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses a rule listed
        twice for one operation
      - >-
        services-platform:modules/custom-objects/tests/unit/portal-access-rules.spec.ts#refuses published on
        an object that is not publishable
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Portal access rules

## Verification Boundary

This unit 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 imported contract and validation code runs locally. The fixture imports identify the setup seams; this register makes no broader claim that dependencies are undoubled.

## Must Not Be Doubled

The contract or validation function under examination must run directly; expected outputs cannot replace it.
