Skip to content

[docs][auth] UserContext is documented with full_name and is_authenticated that don't exist (real: id: str, name, roles, tenant_id) #198

Description

@antosubash

Summary

docs/modules/auth.md documents UserContext fields that aren't on the dataclass.

Environment

  • Framework checkout: v0.0.17-5-g2b079c9; smpy / published simple_module_* / @simple-module-py/*: 0.0.17
  • Python 3.12.3, uv 0.11.7, node v24.15.0, Linux (Ubuntu)

Found while building a real consumer app (Invoice Manager) on the framework.

Evidence

modules/auth/auth/contracts/schemas.pyUserContext is {id: str, email: str, name: str, roles: list[str], tenant_id: str | None} (plus has_role/has_any_role). The docs reference full_name and an is_authenticated property, and imply id may be a UUID/None.

Actual

  • user.id is a stringified UUID (never None once authenticated) — filter UUID columns with uuid.UUID(user.id).
  • The display name is user.name (defaults to full_name or email), not full_name.
  • There is no is_authenticated property.

Impact

Consumers scoping data by user or showing a name follow the doc and hit AttributeError. Suggest correcting auth.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions