Migrate Forms interface patterns
This commit is contained in:
@@ -38,6 +38,13 @@ MODULE_VERSION = "0.1.14"
|
||||
READ_SCOPE = "forms:definition:read"
|
||||
WRITE_SCOPE = "forms:definition:write"
|
||||
ADMIN_SCOPE = "forms:definition:admin"
|
||||
OPTIONAL_DEPENDENCIES = (
|
||||
"forms_runtime",
|
||||
"portal",
|
||||
"workflow_engine",
|
||||
"cases",
|
||||
"policy",
|
||||
)
|
||||
|
||||
|
||||
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
|
||||
@@ -69,13 +76,7 @@ manifest = ModuleManifest(
|
||||
name=MODULE_NAME,
|
||||
version=MODULE_VERSION,
|
||||
dependencies=("access",),
|
||||
optional_dependencies=(
|
||||
"forms_runtime",
|
||||
"portal",
|
||||
"workflow_engine",
|
||||
"cases",
|
||||
"policy",
|
||||
),
|
||||
optional_dependencies=OPTIONAL_DEPENDENCIES,
|
||||
required_capabilities=(
|
||||
CAPABILITY_AUTH_PRINCIPAL_RESOLVER,
|
||||
CAPABILITY_AUTH_PERMISSION_EVALUATOR,
|
||||
@@ -205,6 +206,65 @@ manifest = ModuleManifest(
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"forms.navigation",
|
||||
"forms.catalogue",
|
||||
"forms.state.permission-blocked",
|
||||
"forms.state.empty",
|
||||
],
|
||||
"privacy_notes": [
|
||||
"Definition catalogues contain schemas and policy references, not submitted Form values.",
|
||||
"Package assessment does not grant access to referenced runtime submissions or external providers.",
|
||||
"Published accessibility and localization content is visible wherever the exact definition is authorized.",
|
||||
],
|
||||
},
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="forms.reference.fields-and-consequences",
|
||||
title="Form definition fields and lifecycle consequences",
|
||||
summary="Schema, publication, localization, policy, evidence, package, and handoff semantics for immutable Form revisions.",
|
||||
body=(
|
||||
"The stable key identifies the definition while each save creates a new immutable revision. Field keys, types, "
|
||||
"constraints, visibility conditions, pages, sections, options, help, localization, and accessibility instructions "
|
||||
"become the exact runtime schema. Attachment, signature, policy, draft, and permitted-handoff settings are enforced "
|
||||
"by Forms Runtime when that module is present. Publishing makes a revision available for new instances; existing "
|
||||
"instances retain their prior exact revision. Retirement prevents future use without deleting definitions or submissions. "
|
||||
"Package import always creates a local draft and retains source provenance; it never silently publishes an imported revision."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("admin", "user"),
|
||||
audience=("user", "operator", "module_admin", "auditor"),
|
||||
related_modules=OPTIONAL_DEPENDENCIES,
|
||||
links=(
|
||||
DocumentationLink(
|
||||
label="Forms boundary and recovery",
|
||||
href="govoplan-forms/docs/FORMS_BOUNDARY.md",
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"forms.field.publication-state",
|
||||
"forms.field.signature-requirement",
|
||||
"forms.field.policy-references",
|
||||
"forms.field.handoff-kinds",
|
||||
"forms.field.accessibility",
|
||||
"forms.field.change-reason",
|
||||
"forms.action.save-revision",
|
||||
"forms.action.publish",
|
||||
"forms.action.retire",
|
||||
"forms.action.import-package",
|
||||
],
|
||||
"consequence_classes": {
|
||||
"save_revision": "Creates an immutable definition revision with a change reason.",
|
||||
"publish": "Makes the exact revision available for future authorized instances.",
|
||||
"retire": "Stops future use while retaining definitions and exact runtime references.",
|
||||
"import_package": "Creates a local draft and retains package provenance without automatic publication.",
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
architecture=declared_module_architecture(
|
||||
|
||||
Reference in New Issue
Block a user