Make Access optional for Poll
This commit is contained in:
@@ -29,6 +29,13 @@ Poll does not own:
|
|||||||
- generic form rendering and submission runtime; those belong in `govoplan-forms` and `govoplan-forms-runtime`
|
- generic form rendering and submission runtime; those belong in `govoplan-forms` and `govoplan-forms-runtime`
|
||||||
- mail, notification, and portal delivery infrastructure
|
- 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
|
## Development Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ license = { file = "LICENSE" }
|
|||||||
authors = [{ name = "GovOPlaN" }]
|
authors = [{ name = "GovOPlaN" }]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"govoplan-core>=0.1.8",
|
"govoplan-core>=0.1.8",
|
||||||
"govoplan-access>=0.1.8",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ DOCUMENTATION = (
|
|||||||
"Poll owns reusable poll definitions, options, invitations, responses, visibility rules, "
|
"Poll owns reusable poll definitions, options, invitations, responses, visibility rules, "
|
||||||
"closing semantics, and result summaries. Scheduling consumes Poll for availability "
|
"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",
|
layer="available",
|
||||||
documentation_types=("admin",),
|
documentation_types=("admin",),
|
||||||
@@ -76,9 +79,9 @@ manifest = ModuleManifest(
|
|||||||
id=MODULE_ID,
|
id=MODULE_ID,
|
||||||
name=MODULE_NAME,
|
name=MODULE_NAME,
|
||||||
version=MODULE_VERSION,
|
version=MODULE_VERSION,
|
||||||
dependencies=("access",),
|
dependencies=(),
|
||||||
optional_dependencies=("calendar", "campaigns", "portal", "mail", "notifications", "forms-runtime"),
|
optional_dependencies=("access", "calendar", "campaigns", "portal", "mail", "notifications", "forms-runtime"),
|
||||||
required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
|
optional_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
|
||||||
provides_interfaces=(
|
provides_interfaces=(
|
||||||
ModuleInterfaceProvider(name="poll.option_selection", version="0.1.8"),
|
ModuleInterfaceProvider(name="poll.option_selection", version="0.1.8"),
|
||||||
ModuleInterfaceProvider(name="poll.availability_matrix", version="0.1.8"),
|
ModuleInterfaceProvider(name="poll.availability_matrix", version="0.1.8"),
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ class PollManifestTests(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertIsInstance(manifest, ModuleManifest)
|
self.assertIsInstance(manifest, ModuleManifest)
|
||||||
self.assertEqual(manifest.id, "poll")
|
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.availability_matrix", {interface.name for interface in manifest.provides_interfaces})
|
||||||
self.assertIn("poll:response:write", {permission.scope for permission in manifest.permissions})
|
self.assertIn("poll:response:write", {permission.scope for permission in manifest.permissions})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user