---
id: TST-PFM-SEC-079
title: User display name 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/db/user-display-name.integration.spec.js
implements: []
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/db/user-display-name.integration.spec.js#platform.user_display_name
      (a name, and only a name, across the staff / customer boundary)
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#a
      customer’s administrator
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#does
      not reach the staff member through the view, which is the premise
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#reads
      the staff member’s name through the function
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#Rhythm
      staff on a console route
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#does
      not reach another customer’s user through the view, which is the premise
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#reads
      that user’s name through the function, first and last name when no display name was chosen
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#names
      a former (deleted) user of another customer
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#answers
      NULL for an id of the right grammar that names no user
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#answers
      NULL for a NULL id
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#answers
      NULL for a blank id
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#answers
      NULL for an id that is not a user id at all
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#leaves
      the caller’s own staff setting as it was once the call returns
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#leaves
      the caller’s staff setting exactly as it was when the caller had set it to false
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#leaves
      a session that never set the staff setting reading it as unset, which the policies read as not
      staff
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#the
      migration statement under an owner that is not a superuser, as the deployed migration owner is
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#refuses
      a function SET clause naming app.is_staff (42501), which is the failure the migration must
      avoid
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#creates
      the function from the migration’s own statement
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#takes
      one text and returns one text: no set, no table, no search, a definer with its settings pinned
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#grants
      EXECUTE to no one through PUBLIC
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#grants
      EXECUTE to the application roles that read names
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#withholds
      EXECUTE from a role it was never granted to
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js#still
      names across the boundary when its owner is a role the forced policies bind, as a deployed
      owner is
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/db/user-display-name.integration.spec.js'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: 'services-platform:modules/security/tests/integration/db/user-display-name.integration.spec.js'
  explicit_no_doubles: true
  identified_double_boundaries: []
---
# User display name 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 user display name.

## What This Suite Proves

The file supplies executable engineering checks for the named subject. No complete acceptance scenario is inferred from the file’s existence.

## 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.
