Migrate Voting interface patterns
This commit is contained in:
@@ -52,6 +52,16 @@ MANAGE_SCOPE = "voting:ballot:manage"
|
||||
CAST_SCOPE = "voting:ballot:cast"
|
||||
CERTIFY_SCOPE = "voting:ballot:certify"
|
||||
ADMIN_SCOPE = "voting:ballot:admin"
|
||||
OPTIONAL_DEPENDENCIES = (
|
||||
"committee",
|
||||
"decisions",
|
||||
"encryption",
|
||||
"forms",
|
||||
"identity_trust",
|
||||
"policy",
|
||||
"reporting",
|
||||
"workflow_engine",
|
||||
)
|
||||
|
||||
|
||||
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
|
||||
@@ -103,16 +113,7 @@ manifest = ModuleManifest(
|
||||
name=MODULE_NAME,
|
||||
version=MODULE_VERSION,
|
||||
dependencies=("access",),
|
||||
optional_dependencies=(
|
||||
"committee",
|
||||
"decisions",
|
||||
"encryption",
|
||||
"forms",
|
||||
"identity_trust",
|
||||
"policy",
|
||||
"reporting",
|
||||
"workflow_engine",
|
||||
),
|
||||
optional_dependencies=OPTIONAL_DEPENDENCIES,
|
||||
required_capabilities=(
|
||||
CAPABILITY_AUTH_PRINCIPAL_RESOLVER,
|
||||
CAPABILITY_AUTH_PERMISSION_EVALUATOR,
|
||||
@@ -308,6 +309,67 @@ manifest = ModuleManifest(
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"voting.navigation",
|
||||
"voting.catalogue",
|
||||
"voting.ballot",
|
||||
"voting.state.permission-blocked",
|
||||
"voting.state.ineligible",
|
||||
],
|
||||
"privacy_notes": [
|
||||
"Recorded ballots are reconstructable and must never be described as secret.",
|
||||
"Provider-backed profiles expose only the aggregate, receipt, hash, and evidence allowed by the provider contract.",
|
||||
"The bundled local confidential provider is server-readable and uncertified despite encrypting stored selections.",
|
||||
],
|
||||
},
|
||||
),
|
||||
DocumentationTopic(
|
||||
id="voting.reference.fields-and-consequences",
|
||||
title="Ballot fields, assurance, and lifecycle consequences",
|
||||
summary="Frozen electorate, threshold, provider, receipt, tally, certification, challenge, and annulment semantics.",
|
||||
body=(
|
||||
"Opening freezes the exact options, method, electorate, weights, quorum, threshold, replacement rule, assurance profile, "
|
||||
"and provider binding. Recorded ballots remain attributable and reconstructable. Confidential, secret, and externally "
|
||||
"certified profiles are claims of their installed provider only; the local confidential provider is server-readable and "
|
||||
"uncertified. Casting records or replaces a vote only when the frozen definition permits it and returns a receipt. Closing "
|
||||
"prevents further casting and records the tally. Certification adds evidence without rewriting the result. Challenge and "
|
||||
"annulment are separately reasoned, auditable transitions and never erase the frozen definition, receipts, or prior history."
|
||||
),
|
||||
layer="configured",
|
||||
documentation_types=("admin", "user"),
|
||||
audience=("user", "operator", "module_admin", "auditor"),
|
||||
related_modules=OPTIONAL_DEPENDENCIES,
|
||||
links=(
|
||||
DocumentationLink(
|
||||
label="Voting domain and assurance boundary",
|
||||
href="govoplan-voting/docs/VOTING_DOMAIN.md",
|
||||
kind="repository",
|
||||
),
|
||||
),
|
||||
metadata={
|
||||
"seed": True,
|
||||
"help_contexts": [
|
||||
"voting.field.assurance-profile",
|
||||
"voting.field.provider-reference",
|
||||
"voting.field.electorate",
|
||||
"voting.field.quorum-threshold",
|
||||
"voting.action.cast",
|
||||
"voting.action.open",
|
||||
"voting.action.close",
|
||||
"voting.action.certify",
|
||||
"voting.action.challenge",
|
||||
"voting.action.annul",
|
||||
],
|
||||
"consequence_classes": {
|
||||
"open": "Freezes the ballot definition and electorate and permits authorized casting.",
|
||||
"cast": "Records or replaces one authorized vote and returns a privacy-bounded receipt.",
|
||||
"close": "Stops casting and records the aggregate tally.",
|
||||
"certify": "Adds certification evidence without rewriting the frozen result.",
|
||||
"challenge_or_annul": "Appends a reasoned governance transition while retaining prior evidence.",
|
||||
},
|
||||
},
|
||||
),
|
||||
),
|
||||
architecture=declared_module_architecture(
|
||||
|
||||
Reference in New Issue
Block a user