feat: enforce effective appearance policy

This commit is contained in:
2026-08-20 07:03:28 +02:00
parent 566b3b83ad
commit 6052dde760
2 changed files with 53 additions and 2 deletions
+19
View File
@@ -301,6 +301,25 @@ ADMIN_READ_SCOPES = (
)
ACCESS_DOCUMENTATION: tuple[DocumentationTopic, ...] = (
DocumentationTopic(
id="access.reference.effective-appearance",
title="Understand the effective appearance source",
summary="The authenticated profile explains whether the active palette comes from the user, tenant, system, or a policy lock.",
body=(
"An explicit personal palette normally wins over tenant and system defaults. "
"Resetting it stores inheritance, not a copy of the current default. A tenant "
"policy lock suppresses personal choices; a system lock suppresses both tenant "
"and personal choices. Access enforces the lock during profile writes and returns "
"the effective palette, source, inherited value, and lock state on full profile responses."
),
layer="always",
documentation_types=("admin", "user"),
audience=("user", "tenant_admin", "system_admin"),
order=8,
links=(DocumentationLink(label="Profile API", href="/api/v1/auth/profile", kind="api"),),
related_modules=("admin", "tenancy"),
metadata={"kind": "reference", "help_contexts": ["core.settings", "admin.system-settings", "tenancy.admin.tenant-settings"]},
),
DocumentationTopic(
id="access.reference.resource-explanation-subjects",
title="Select a user for resource-access diagnostics",