Adventure Labs Logo
Scout Docs

User_document_statuses

Status-only view of user documents for compliance rollups

Read-only view over Documents rows where user_id is set. It exposes validity and approval state without uri, size_bytes, or identifier, so roles can see whether a teammate is compliant without being able to open the files.

Column NameData TypeSource
idbigintdocuments.id
user_iduuiddocuments.user_id
template_idbigintdocuments.template_id
valid_fromtimestamp with time zonedocuments.valid_from
valid_totimestamp with time zonedocuments.valid_to
is_approvedbooleandocuments.is_approved
approved_attimestamp with time zonedocuments.approved_at
lifecyclepublic.entity_lifecycledocuments.lifecycle
created_attimestamp with time zonedocuments.created_at

Security

Security-barrier view owned by postgres (not security_invoker); the access predicate is inlined in the view definition.

OperationAbility keyOther paths
SELECTuser_documents.status.read or user_documents.read in a herd the document owner is active inDocument owner; platform superadmin

Writes are not possible through the view.

Realtime

{herd_id}-user_document_statuses broadcasts the same sanitized columns as this view. The private topic accepts either user_documents.status.read or user_documents.read; the existing {herd_id}-user_documents topic continues to require full document read access and carries the document row.

On this page