---
id: TST-PFM-SEC-128
title: Manage assignments database and service checks
kind: integration
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js
implements:
  - ATS-PFM-SEC-009-06
  - ATS-PFM-SEC-010-05
  - ATS-PFM-SEC-010-06
  - ATS-PFM-SEC-010-07
  - ATS-PFM-SEC-010-11
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: Use the prepared test database and suite-owned fixture rows; retain shared seed records.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#security:
      granting and withdrawing a console user’s roles
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#grantRole
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#grants
      a role at customer scope, active at once for an active person, and audits it as widening
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#grants
      a tenant-scoped role to the same person, which is a different grant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#grants
      a role on one custom object, which is a different grant from the tenant-wide one, and lists it
      with its resource
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#leaves
      a grant to somebody who has not accepted yet pending, so it begins when they do
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#refuses
      a second grant of the same role at the same scope, and writes no second row
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#refuses
      a grant to a revoked member, and grants nothing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#answers
      a user of another customer as not found, saying nothing about whether they exist
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#refuses
      a built-in role key Rhythm does not have, naming it, and grants nothing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#refuses
      a staff-only role for a customer's user as not found, by its key or its id, and grants nothing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#withdrawRole
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#revokes
      the grant, keeps the row, and audits what was withdrawn
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#answers
      a grant of another person as not found, and leaves it standing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js#refuses
      the withdrawal that would leave the customer with no security administrator, and withdraws
      nothing
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The file declares no substituted collaborators.
evidence:
  - >-
    services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: >-
    services-platform:modules/security/tests/integration/services/membership/manage-assignments.integration.spec.js
  explicit_no_doubles: true
  identified_double_boundaries: []
---
# Manage assignments database and service checks

## Verification Boundary

The file exercises database or service behavior through the local integration harness. The assertion references identify the source checks for manage assignments.

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here. The file declares no substituted collaborators.

## Must Not Be Doubled

Keep the queried database, applicable constraints and transaction boundaries real. Provider substitutes cannot establish delivery, cloud execution or cross-service recovery.
