SessionsChatActivityMemoryKnowledgeAutonomyFinancePositionsAppsPreferencesConfigReviewIdentitySystemSettings
{# Multitenant-only links hide in single-user. An explicitly-passed
`is_multitenant` wins; pages that don't pass it fall back to the
posture SSOT via the `is_multitenant_posture` Jinja global (P0-3 —
undefined used to mean "shown", leaking Profile/Sign In into
local/own_ops on the server.py-rendered pages). #}
{% set _show_tenant = is_multitenant if is_multitenant is defined else is_multitenant_posture() %}
{% if _show_tenant %}
Profile
{% if is_admin %}
Admin
{% endif %}
{% if is_authenticated %}
Logout
{% else %}
Sign In
{% endif %}
{% elif is_own_ops_posture() and request_is_authenticated(request) %}
{# own_ops (030 S5): the owner-login cookie lasts 7 days — give the
logged-in owner a way to end the session. Auth state comes from
request.state via the Jinja global, so no per-route context
threading is needed (same pattern as is_multitenant_posture). #}
Logout
{% endif %}