Migrate IDM interface patterns

This commit is contained in:
2026-08-03 12:36:49 +02:00
parent 6f6c45f6e2
commit d8643174d7
11 changed files with 766 additions and 84 deletions
+111
View File
@@ -29,6 +29,8 @@ from govoplan_core.core.organizations import (
from govoplan_core.core.views import ViewSurface
from govoplan_core.core.module_guards import persistent_table_uninstall_guard
from govoplan_core.core.modules import (
DocumentationCondition,
DocumentationLink,
DocumentationTopic,
FrontendModule,
FrontendRoute,
@@ -327,6 +329,34 @@ manifest = ModuleManifest(
documentation_types=("admin",),
audience=("tenant_admin", "access_admin", "operator"),
related_modules=("identity", "organizations", "access", "audit", "policy"),
links=(
DocumentationLink(
label="IDM workspace",
href="/idm",
kind="runtime",
),
DocumentationLink(
label="IDM settings API",
href="/api/v1/idm/settings",
kind="api",
),
),
metadata={
"kind": "reference",
"help_contexts": [
"idm.governance.settings",
"idm.assignment.change-request",
"idm.assignment.emergency-override",
"idm.function-change.request",
"idm.function-change.grant",
"idm.function-change.decision",
],
"consequence_classes": {
"governance_settings": "Changes whether direct assignment mutations require approved change evidence.",
"emergency_override": "Bypasses the normal governed request or grant path and requires retained reason and evidence.",
"function_decision": "Advances or terminates a governed change and retains actor, comment, policy, and workflow evidence.",
},
},
order=27,
),
DocumentationTopic(
@@ -359,8 +389,89 @@ manifest = ModuleManifest(
documentation_types=("admin", "user"),
audience=("tenant_admin", "access_admin", "operator", "user"),
related_modules=("identity", "organizations", "access"),
conditions=(
DocumentationCondition(any_scopes=IDM_READ_SCOPES),
),
links=(
DocumentationLink(
label="IDM assignments",
href="/idm",
kind="runtime",
),
DocumentationLink(
label="Organization function assignments API",
href="/api/v1/idm/organization-function-assignments",
kind="api",
),
),
metadata={
"kind": "workflow",
"help_contexts": [
"idm.route.assignments",
"idm.action.view-function-assignments",
"idm.blocker.permission",
"idm.blocker.no-functions",
"idm.blocker.identity-search",
],
},
order=28,
),
DocumentationTopic(
id="idm.reference.fields-and-consequences",
title="IDM assignment fields and consequences",
summary=(
"Reference for direct assignments, delegation, acting-for, "
"effective dates, governed changes, evidence, and retention."
),
body=(
"Identity and account select who receives the institutional fact; "
"function and unit are owned by Organizations. Source distinguishes "
"direct, delegated, acting-for, directory, governance, and system facts. "
"Delegation and acting-for require a valid source assignment and the "
"corresponding function permission. Subunit scope broadens the fact's "
"organizational reach. Deactivation and expiry preserve provenance while "
"removing the assignment from effective resolution. Governed request and "
"grant decisions retain actor, policy, workflow revision, comments, and "
"evidence. An emergency override is not the normal process and must carry "
"an explicit reason. An IDM assignment alone never grants application "
"permissions; Access requires an explicit mapping."
),
layer="configured",
documentation_types=("admin", "user"),
audience=("tenant_admin", "access_admin", "operator", "user"),
related_modules=("identity", "organizations", "access", "policy", "audit", "workflow_engine"),
links=(
DocumentationLink(
label="Function assignment workflows",
href="docs/FUNCTION_ASSIGNMENT_WORKFLOWS.md",
kind="repository",
),
),
metadata={
"kind": "reference",
"help_contexts": [
"idm.field.identity",
"idm.field.account",
"idm.field.function",
"idm.field.source",
"idm.field.delegation",
"idm.field.acting-for",
"idm.field.subunits",
"idm.field.effective-dates",
"idm.field.justification",
"idm.field.evidence",
"idm.field.retention",
],
"consequence_classes": {
"assignment": "Changes the effective institutional function fact consumed by optional downstream capabilities.",
"deactivate_or_expire": "Removes the fact from effective resolution while retaining provenance and lifecycle evidence.",
"delegation": "Creates a bounded derived assignment that remains tied to its source assignment.",
"acting_for": "Allows a bounded account to act in place of a source assignment when Organizations permits it.",
"retention": "Changes how long detailed assignment-change evidence remains available.",
},
},
order=29,
),
),
architecture=declared_module_architecture(
layer="institutional_foundation",