Make Access optional for Poll

This commit is contained in:
2026-07-12 09:32:16 +02:00
parent fa87b247e5
commit ddf1fcc217
4 changed files with 18 additions and 6 deletions

View File

@@ -29,6 +29,13 @@ Poll does not own:
- generic form rendering and submission runtime; those belong in `govoplan-forms` and `govoplan-forms-runtime`
- mail, notification, and portal delivery infrastructure
## Optional Access Integration
`govoplan-access` is optional. With Access installed, Poll can use identity
resolution, permission checks, and role templates. Without Access, Poll remains
usable for reduced flows such as anonymous participation, signed public links,
or participant lists supplied by another adapter.
## Development Install
```bash

View File

@@ -12,7 +12,6 @@ license = { file = "LICENSE" }
authors = [{ name = "GovOPlaN" }]
dependencies = [
"govoplan-core>=0.1.8",
"govoplan-access>=0.1.8",
]
[tool.setuptools.packages.find]

View File

@@ -62,7 +62,10 @@ DOCUMENTATION = (
body=(
"Poll owns reusable poll definitions, options, invitations, responses, visibility rules, "
"closing semantics, and result summaries. Scheduling consumes Poll for availability "
"matrices, while Evaluation owns heavier surveys, scoring, rubrics, and analytics."
"matrices, while Evaluation owns heavier surveys, scoring, rubrics, and analytics. "
"Access is optional: when installed, Poll can use principal resolution, permission "
"evaluation, and role templates; without it, Poll is limited to anonymous, signed-link, "
"or adapter-provided participant flows."
),
layer="available",
documentation_types=("admin",),
@@ -76,9 +79,9 @@ manifest = ModuleManifest(
id=MODULE_ID,
name=MODULE_NAME,
version=MODULE_VERSION,
dependencies=("access",),
optional_dependencies=("calendar", "campaigns", "portal", "mail", "notifications", "forms-runtime"),
required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
dependencies=(),
optional_dependencies=("access", "calendar", "campaigns", "portal", "mail", "notifications", "forms-runtime"),
optional_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
provides_interfaces=(
ModuleInterfaceProvider(name="poll.option_selection", version="0.1.8"),
ModuleInterfaceProvider(name="poll.availability_matrix", version="0.1.8"),

View File

@@ -12,7 +12,10 @@ class PollManifestTests(unittest.TestCase):
self.assertIsInstance(manifest, ModuleManifest)
self.assertEqual(manifest.id, "poll")
self.assertIn("access", manifest.dependencies)
self.assertNotIn("access", manifest.dependencies)
self.assertIn("access", manifest.optional_dependencies)
self.assertFalse(manifest.required_capabilities)
self.assertIn("auth.principalResolver", manifest.optional_capabilities)
self.assertIn("poll.availability_matrix", {interface.name for interface in manifest.provides_interfaces})
self.assertIn("poll:response:write", {permission.scope for permission in manifest.permissions})