From ddf1fcc217134ab3f94486d7ada46c7587cfb4dc Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Sun, 12 Jul 2026 09:32:16 +0200 Subject: [PATCH] Make Access optional for Poll --- README.md | 7 +++++++ pyproject.toml | 1 - src/govoplan_poll/backend/manifest.py | 11 +++++++---- tests/test_manifest.py | 5 ++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5ab77d3..abf4f79 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2f9e23e..953dad2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/src/govoplan_poll/backend/manifest.py b/src/govoplan_poll/backend/manifest.py index 73c1b06..ca28262 100644 --- a/src/govoplan_poll/backend/manifest.py +++ b/src/govoplan_poll/backend/manifest.py @@ -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"), diff --git a/tests/test_manifest.py b/tests/test_manifest.py index faf4288..e798731 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -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})