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

Closed

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.py UserContext 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.

Activity

  1. antosubash commented on Jun 8, 2026

    @antosubash
    OwnerAuthor

    Fixed on main by #205 ("full review and sync of docs to current code state").

    docs/modules/auth.md now documents the real UserContext dataclass — id: str, email, name, roles, tenant_id, plus the has_role / has_any_role helpers — and the name field is correctly described as full_name or email of the source user. The nonexistent full_name and is_authenticated fields on the context are gone. Verified against current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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